[Git][reproducible-builds/diffoscope][master] 2 commits: Use skipif instead of manual conditionals.
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Thu Oct 28 09:30:02 UTC 2021
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
34df4921 by Chris Lamb at 2021-10-28T10:28:01+01:00
Use skipif instead of manual conditionals.
- - - - -
ef878eca by Chris Lamb at 2021-10-28T10:29:38+01:00
Skip Python bytecode testing where we do not have an expected diff. (Closes: reproducible-builds/diffoscope#284)
- - - - -
1 changed file:
- tests/comparators/test_python.py
Changes:
=====================================
tests/comparators/test_python.py
=====================================
@@ -22,6 +22,7 @@ import sys
from diffoscope.comparators.python import PycFile
from ..utils.data import assert_diff_startswith, load_fixture
+from ..utils.tools import skipif
pyc1 = load_fixture("test1.pyc-renamed")
@@ -33,12 +34,12 @@ def test_identification(pyc1, pyc2):
assert isinstance(pyc2, PycFile)
+ at skipif(sys.version_info >= (3, 10), reason="Unstable on 3.10+")
def test_no_differences(pyc1):
# Disassembling bytecode prior to Python 3.10 is stable when applied to
# itself, otherwise various memory offsets (or memory addresses?) are
# non-deterministic.
- if sys.version_info < (3, 10):
- assert pyc1.compare(pyc1) is None
+ assert pyc1.compare(pyc1) is None
@pytest.fixture
@@ -46,6 +47,10 @@ def differences(pyc1, pyc2):
return pyc1.compare(pyc2).details
+ at skipif(
+ sys.version_info < (3, 9),
+ reason="pyc_expected_diff generated on Python 3.9",
+)
def test_diff(differences):
assert_diff_startswith(
differences[0],
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/ee2fb1e9804e997045fb852cdde02c7bd1351aae...ef878ecad7d4278d675434ca5d59dd430ea9052c
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/ee2fb1e9804e997045fb852cdde02c7bd1351aae...ef878ecad7d4278d675434ca5d59dd430ea9052c
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/20211028/685018fa/attachment.htm>
More information about the rb-commits
mailing list