diff options
Diffstat (limited to 'library/python/cpp_test')
| -rw-r--r-- | library/python/cpp_test/conftest.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/python/cpp_test/conftest.py b/library/python/cpp_test/conftest.py index 40576c3aac7..5e9a0fbf9a9 100644 --- a/library/python/cpp_test/conftest.py +++ b/library/python/cpp_test/conftest.py @@ -2,16 +2,16 @@ import difflib def iter_diff(fr, to): - for l in difflib.unified_diff(fr.splitlines(), to.splitlines(), fromfile='L', tofile='R'): - l = l.rstrip('\n') + for line in difflib.unified_diff(fr.splitlines(), to.splitlines(), fromfile='L', tofile='R'): + line = line.rstrip('\n') - if l: - if l[0] == '-': - l = '[[bad]]' + l + '[[rst]]' - elif l[0] == '+': - l = '[[good]]' + l + '[[rst]]' + if line: + if line[0] == '-': + line = '[[bad]]' + line + '[[rst]]' + elif line[0] == '+': + line = '[[good]]' + line + '[[rst]]' - yield l + yield line def pytest_assertrepr_compare(op, left, right): |
