| LEFT | RIGHT |
| 1 # This file is part of Adblock Plus <https://adblockplus.org/>, | 1 # This file is part of Adblock Plus <https://adblockplus.org/>, |
| 2 # Copyright (C) 2006-present eyeo GmbH | 2 # Copyright (C) 2006-present eyeo GmbH |
| 3 # | 3 # |
| 4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
| 5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
| 6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
| 7 # | 7 # |
| 8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 src2 = MockSource(is_inheritable=False, | 111 src2 = MockSource(is_inheritable=False, |
| 112 inc1='%include inc2%', inc2='Included') | 112 inc1='%include inc2%', inc2='Included') |
| 113 with pytest.raises(IncludeError): | 113 with pytest.raises(IncludeError): |
| 114 render_str('src1:fl', {'src1': src1, 'src2': src2}) | 114 render_str('src1:fl', {'src1': src1, 'src2': src2}) |
| 115 | 115 |
| 116 | 116 |
| 117 def test_missing_header(): | 117 def test_missing_header(): |
| 118 src = MockSource(fl='! No header') | 118 src = MockSource(fl='! No header') |
| 119 with pytest.raises(MissingHeader): | 119 with pytest.raises(MissingHeader): |
| 120 render_str('fl', {}, src) | 120 render_str('fl', {}, src) |
| 121 |
| 122 |
| 123 def test_remove_checksum(head): |
| 124 src = MockSource(fl='[Adblock]\n! Comment\n! Checksum: foo') |
| 125 got = render_str('fl', {}, src) |
| 126 assert got == head + '! Comment' |
| LEFT | RIGHT |