You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I havent investigated what is going on yet. Possibly the minimum pytest version is too low? I notice tox.ini isnt testing against the minimum pytest version.
platformlinux2--Python2.7.17, pytest-3.10.1, py-1.9.0, pluggy-0.13.1--/usr/bin/python2cachedir: .pytest_cacherootdir: /home/abuild/rpmbuild/BUILD/pytest-fixture-marker-1.0.0, inifile:
plugins: fixture-marker-1.0.0collecting ... collected5itemstests/test_fixture_marker.py::test_help_messagePASSED [ 20%]
tests/test_fixture_marker.py::test_mark_fixture[default] FAILED [ 40%]
tests/test_fixture_marker.py::test_mark_fixture[expression-suffix] FAILED [ 60%]
tests/test_fixture_marker.py::test_mark_fixture[arg] FAILED [ 80%]
tests/test_fixture_marker.py::test_mark_fixture[arg-has-precedence-over-ini] FAILED [100%]
===================================FAILURES===================================__________________________test_mark_fixture[default] __________________________testdir=<Testdirlocal('/tmp/pytest-of-abuild/pytest-0/test_mark_fixture0')>args= ['-m fixture_foobar'], ini=None
@pytest.mark.parametrize(
"args,ini",
[
pytest.param(["-m fixture_foobar"], None, id="default"),
pytest.param(["-m foobar_suffix"], "{}_suffix", id="expression-suffix"),
pytest.param(
["-m foobar_arg", "--fixture-marker-expression={}_arg"], None, id="arg"
),
pytest.param(
["-m foobar_arg", "--fixture-marker-expression={}_arg"],
"{}_ini",
id="arg-has-precedence-over-ini",
),
],
)
deftest_mark_fixture(testdir, args, ini):
"""Test the tests are marked as expected"""ifiniisnotNone:
testdir.makeini(
""" [pytest] fixture_marker_expression = {} """.format(
ini
)
)
# create a temporary pytest test moduletestdir.makepyfile(
""" import pytest @pytest.fixture() def foobar(): pass def test_uses(foobar): pass def test_not(): pass """
)
assertisinstance(
args, (list, tuple)
) # cause I already shot myself in the foot by not having a trailing comma# run pytest with the following cmd argsresult=testdir.runpytest("-v", "--strict-markers", *args)
# fnmatch_lines does an assertion internally# check we collect 2 but only run the test using the fixtureresult.stdout.fnmatch_lines(
> ["*collected 2 items / 1 deselected*", "*::test_uses PASSED*"]
)
EFailed: nomatch: '*collected 2 items / 1 deselected*'Eand: u''Eremainsunmatched: '*collected 2 items / 1 deselected*'/home/abuild/rpmbuild/BUILD/pytest-fixture-marker-1.0.0/tests/test_fixture_marker.py:66: Failed-----------------------------Capturedstderrcall-----------------------------usage: pytest-2.7 [options] [file_or_dir] [file_or_dir] [...]
pytest-2.7: error: unrecognizedarguments: --strict-markersinifile: Nonerootdir: /tmp/pytest-of-abuild/pytest-0/test_mark_fixture0
The text was updated successfully, but these errors were encountered:
I havent investigated what is going on yet. Possibly the minimum pytest version is too low? I notice tox.ini isnt testing against the minimum pytest version.
The text was updated successfully, but these errors were encountered: