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

Unified Diff: tests/test_diff_script.py

Issue 29933555: Noissue - fix coding style and adjust linting config (Closed) Base URL: https://hg.adblockplus.org/python-abp
Patch Set: Created Nov. 1, 2018, 11:21 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « abp/filters/sources.py ('k') | tests/test_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_diff_script.py
===================================================================
--- a/tests/test_diff_script.py
+++ b/tests/test_diff_script.py
@@ -121,18 +121,17 @@
code, err, _ = run_script(str(rootdir.join('latest.txt')), '-o',
str(diff_dir), *base_no_version)
assert code == 1
assert 'Unable to find Version in ' in err
def test_write_and_overwrite(rootdir, archived_files, diff_dir):
test_diff_with_outfile(rootdir, archived_files, diff_dir)
- latest = re.sub(r'&act=ads_', '! ', BASE)
- latest = latest + '&adurl=\n'
+ latest = re.sub(r'&act=ads_', '! ', BASE) + '&adurl=\n'
rhowell 2018/11/01 20:50:15 Ah, good catch here.
rootdir.join('latest.txt').write_text(latest, encoding='utf8')
run_script(str(rootdir.join('latest.txt')), '-o', str(diff_dir),
*archived_files)
assert len(diff_dir.listdir()) == 2
for file in diff_dir.visit():
with io.open(str(file), encoding='utf-8') as dst:
result = dst.read()
assert '- &act=ads_' in result
« no previous file with comments | « abp/filters/sources.py ('k') | tests/test_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld