Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: tests/test_renderer.py

Issue 29851654: Issue 6850 - Remove generation of checksums (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Left Patch Set: Remove checksum documentation from the README Created Aug. 9, 2018, 10:05 p.m.
Right Patch Set: Add test for checksum removal, fix README references Created Aug. 10, 2018, 10:28 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « tests/test_render_script.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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'
LEFTRIGHT

Powered by Google App Engine
This is Rietveld