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

Delta Between Two Patch Sets: tests/test_diff_script.py

Issue 29884571: Issue 6945 - Add script to make filter list diffs (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Left Patch Set: Address comments on PS4 Created Sept. 25, 2018, 11:01 p.m.
Right Patch Set: Fix docstring Created Sept. 26, 2018, 6:20 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 | « setup.py ('k') | tests/test_differ.py » ('j') | 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
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 # 12 #
13 # You should have received a copy of the GNU General Public License 13 # You should have received a copy of the GNU General Public License
14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
15 15
16 """Functional tests for the rendering script. 16 """Functional tests for the diff script."""
Vasily Kuznetsov 2018/09/26 16:50:41 This docstring seems to not be quite accurate...
rhowell 2018/09/26 18:22:56 Oops! Not sure how I missed that. Done!
17
18 These tests create files on the filesystem, bring up a small webserver and
19 generally test the script under reasonably realistic conditions.
20 """
21 17
22 from __future__ import unicode_literals 18 from __future__ import unicode_literals
23 19
24 import pytest 20 import pytest
25 import subprocess 21 import subprocess
26 import io 22 import io
27 23
28 from test_differ import BASE, LATEST 24 from test_differ import BASE, LATEST
29 25
30 26
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 def test_no_latest_file(rootdir): 76 def test_no_latest_file(rootdir):
81 code, err, _ = run_script(str(rootdir.join('base.txt')), 'wrong.txt') 77 code, err, _ = run_script(str(rootdir.join('base.txt')), 'wrong.txt')
82 assert code == 1 78 assert code == 1
83 assert 'No such file or directory' in err 79 assert 'No such file or directory' in err
84 80
85 81
86 def test_diff_to_self(rootdir): 82 def test_diff_to_self(rootdir):
87 _, _, out = run_script(str(rootdir.join('latest.txt')), 83 _, _, out = run_script(str(rootdir.join('latest.txt')),
88 str(rootdir.join('latest.txt'))) 84 str(rootdir.join('latest.txt')))
89 assert out == '[Adblock Plus Diff]\n' 85 assert out == '[Adblock Plus Diff]\n'
LEFTRIGHT

Powered by Google App Engine
This is Rietveld