[Git][reproducible-builds/diffoscope][master] 3 commits: Include the Black output in the assertion failure too.

Chris Lamb gitlab at salsa.debian.org
Tue May 12 08:56:24 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
d7434370 by Chris Lamb at 2020-05-12T09:53:48+01:00
Include the Black output in the assertion failure too.

- - - - -
cd224c54 by Chris Lamb at 2020-05-12T09:54:35+01:00
We don't care about the length of the black output, rather whether it has some or not.

- - - - -
c01c9b4b by Chris Lamb at 2020-05-12T09:55:19+01:00
Format diffoscope/comparators/utils/command.py according to Black 19.10b0-3.

- - - - -


2 changed files:

- diffoscope/comparators/utils/command.py
- tests/test_source.py


Changes:

=====================================
diffoscope/comparators/utils/command.py
=====================================
@@ -102,8 +102,7 @@ class Command(metaclass=abc.ABCMeta):
 
         if len(lines) > Command.MAX_STDERR_LINES:
             buf += '[ truncated after {} lines; {} ignored ]\n'.format(
-                Command.MAX_STDERR_LINES,
-                len(lines) - Command.MAX_STDERR_LINES
+                Command.MAX_STDERR_LINES, len(lines) - Command.MAX_STDERR_LINES
             )
 
         return buf


=====================================
tests/test_source.py
=====================================
@@ -250,7 +250,7 @@ def test_code_is_black_clean():
     # Display diff in "captured stdout call"
     print(output)
 
-    assert len(output) == 0
+    assert not output, output
 
 
 def test_does_not_add_new_test_files():



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/a294ad1b0472a805e0e54f4aee0f8731ecf45892...c01c9b4bae7006f69988dc6d1d5190baeb29e768

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/a294ad1b0472a805e0e54f4aee0f8731ecf45892...c01c9b4bae7006f69988dc6d1d5190baeb29e768
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200512/ada2f78a/attachment.htm>


More information about the rb-commits mailing list