[Git][reproducible-builds/diffoscope][master] Fix reverted logic in assert_diff_startswith()

Chris Lamb (@lamby) gitlab at salsa.debian.org
Sun Nov 7 09:21:33 UTC 2021



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
aea11a3b by Zbigniew Jędrzejewski-Szmek at 2021-11-07T10:08:26+01:00
Fix reverted logic in assert_diff_startswith()

With this change, tests actually pass with python 3.10
(python3-3.10.0-1.fc35.x86_64).

- - - - -


1 changed file:

- tests/utils/data.py


Changes:

=====================================
tests/utils/data.py
=====================================
@@ -67,7 +67,7 @@ def assert_diff(difference, filename):
 def assert_diff_startswith(difference, filename):
     haystack = difference.unified_diff
     needle = get_data(filename)
-    assert needle.startswith(haystack)
+    assert haystack.startswith(needle)
 
 
 # https://code.activestate.com/recipes/576620-changedirectory-context-manager/#c3



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/aea11a3ba8d9f116827b685cd91075bd8a64ead2

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/aea11a3ba8d9f116827b685cd91075bd8a64ead2
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/20211107/33c58f10/attachment.htm>


More information about the rb-commits mailing list