Bug#841146: diffoscope: Failure of test_superblock
Leo Famulari
leo at famulari.name
Fri Oct 21 21:00:35 UTC 2016
On Fri, Oct 21, 2016 at 04:23:51PM +0000, Mattia Rizzolo wrote:
> Though I'm using pytest 3.0.3.
> That test is skipped by using pytest.mark.skip(), which I don't see in
> the docs of pytest for 2.7.
> The changelog of pytest tells me pytest.mark.skip() is recognized as a
> skipping marker starting from 2.9¹. Is there any chance you can instead
> upgrade pytest in your distribution?
We are working on upgrading the core Python packages like pytest and
Setuptools but we can't do it overnight.
> If so I'll add a versioned dependency on setup.py, otherwies I can
> always turn that pytest.mark.skip() into a pytest.mark.skipif(True),
> which is IMHO ugly but quick and effective for solving this bug, I
> think. Can you also try to convert that marking in
> tests/comparators/utils.py:49 to confirm?
I tried making the following change:
diff --git a/tests/comparators/utils.py b/tests/comparators/utils.py
index f8f6399..acbdc9f 100644
--- a/tests/comparators/utils.py
+++ b/tests/comparators/utils.py
@@ -46,7 +46,7 @@ def skip_unless_tools_exist(*required):
def skip_unless_tool_is_older_than(tool, actual_ver, min_ver, vcls=LooseVersion):
if tools_missing(tool):
- return pytest.mark.skip(reason="requires {}".format(tool))
+ return pytest.mark.skipif(True))
if callable(actual_ver):
actual_ver = actual_ver()
return pytest.mark.skipif(
But, that creates a bunch of invalid syntax. Here's one:
_______________ ERROR collecting tests/comparators/test_utils.py _______________
/gnu/store/1n2h8244hw0xvldqdz10lspp60snqw2v-python-pytest-2.7.3/lib/python3.5/site-packages/pytest-2.7.3-py3.5.egg/_pytest/python.py:498: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=True)
/gnu/store/syf4ac6vw94d5qvaacmjq33wfhbgizcr-python-py-1.4.31/lib/python3.5/site-packages/py-1.4.31-py3.5.egg/py/_path/local.py:650: in pyimport
__import__(modname)
<frozen importlib._bootstrap>:969: in _find_and_load
???
<frozen importlib._bootstrap>:958: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:664: in _load_unlocked
???
<frozen importlib._bootstrap>:634: in _load_backward_compatible
???
/gnu/store/1n2h8244hw0xvldqdz10lspp60snqw2v-python-pytest-2.7.3/lib/python3.5/site-packages/pytest-2.7.3-py3.5.egg/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
tests/comparators/test_utils.py:27: in <module>
from utils import tools_missing, skip_unless_tools_exist, data, load_fixture, \
E File "/tmp/guix-build-diffoscope-61.drv-0/diffoscope-61/tests/comparators/utils.py", line 49
E return pytest.mark.skipif(True))
E ^
E SyntaxError: invalid syntax
I don't know Python well; it's possible I made the wrong change.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20161021/3fa92e53/attachment.sig>
More information about the Reproducible-builds
mailing list