[Git][reproducible-builds/diffoscope][master] Don't bother to check version number in test_python.py: the fixture for this test is fixed.
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Wed Aug 14 09:58:34 UTC 2024
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
288c65c1 by Chris Lamb at 2024-08-14T10:57:48+01:00
Don't bother to check version number in test_python.py: the fixture for this test is fixed.
- - - - -
1 changed file:
- tests/comparators/test_python.py
Changes:
=====================================
tests/comparators/test_python.py
=====================================
@@ -17,39 +17,23 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import pytest
-import sys
from diffoscope.comparators.python import PycFile
from ..utils.data import assert_diff_startswith, load_fixture
from ..utils.nonexisting import assert_non_existing
-from ..utils.tools import (
- skipif,
- skip_unless_file_version_is_at_least,
-)
+from ..utils.tools import skip_unless_file_version_is_at_least
pyc1 = load_fixture("test1.pyc-renamed")
pyc2 = load_fixture("test2.pyc-renamed")
-def skip_unless_correct_python_version():
- TEST_FIXTURES_GENERATED_BY = (3, 12)
-
- display = ".".join(str(x) for x in TEST_FIXTURES_GENERATED_BY)
-
- return skipif(
- sys.version_info[:2] != TEST_FIXTURES_GENERATED_BY,
- reason=f"Only Python {display} can de-marshal test1.pyc-renamed",
- )
-
-
@skip_unless_file_version_is_at_least("5.39")
def test_identification(pyc1, pyc2):
assert isinstance(pyc1, PycFile)
assert isinstance(pyc2, PycFile)
- at skip_unless_correct_python_version()
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
@@ -63,7 +47,6 @@ def differences(pyc1, pyc2):
@skip_unless_file_version_is_at_least("5.39")
- at skip_unless_correct_python_version()
def test_diff(differences):
assert_diff_startswith(differences[0], "pyc_expected_diff")
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/288c65c10059ab5ad03ab2e9a49ee0f0408c712c
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/288c65c10059ab5ad03ab2e9a49ee0f0408c712c
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/20240814/de2cc41f/attachment.htm>
More information about the rb-commits
mailing list