On Sat, Oct 22, 2016 at 08:39:00PM +0000, HW42 wrote: > Leo Famulari: > > 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)) > > That's one closing paren to much.
Sorry for the bogus message :/ When I format the code correctly, the test is skipped and we can build diffoscope successfully: diff --git a/tests/comparators/utils.py b/tests/comparators/utils.py index f8f6399..d2da9d6 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, reason="Requires pytest >= 2.9") if callable(actual_ver): actual_ver = actual_ver() return pytest.mark.skipif( > > 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 don't think it's necessary for you to make that change in diffoscope; we can skip the test in our packaging while we work on upgrading pytest. But of course it's up to you.
signature.asc
Description: PGP signature