-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.5: pytest fails #10
Comments
@kloczek, you can work around that by setting |
Why not change the code to make that default behaviour of the pytest execution? 🤔 |
Just tested 1.0.6 and pytest still fails. Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-lazy-fixtures-1.0.6-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-lazy-fixtures-1.0.6-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-lazy-fixtures-1.0.6
configfile: pyproject.toml
collected 19 items
tests/tests.py ..FFFFFFFFFFF...... [100%]
=================================== FAILURES ===================================
_____________________ test_lazy_fixture[first0-second0-4] ______________________
first = one, second = two, other = 4
@pytest.mark.parametrize(("first", "second", "other"), [(lf("one"), lf("two"), 4)])
def test_lazy_fixture(first, second, other):
> assert first == 1
E assert one == 1
tests/tests.py:19: AssertionError
_______________ test_lazy_fixture_data_types[actual0-expected0] ________________
actual = {'a': [one, two]}, expected = {'a': [1, 2]}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E AssertionError: assert {'a': [one, two]} == {'a': [1, 2]}
E
E Differing items:
E {'a': [one, two]} != {'a': [1, 2]}
E Use -v to get more diff
tests/tests.py:38: AssertionError
_______________ test_lazy_fixture_data_types[actual1-expected1] ________________
actual = {'a': {two, one}}, expected = {'a': {1, 2}}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E AssertionError: assert {'a': {two, one}} == {'a': {1, 2}}
E
E Differing items:
E {'a': {two, one}} != {'a': {1, 2}}
E Use -v to get more diff
tests/tests.py:38: AssertionError
_______________ test_lazy_fixture_data_types[actual2-expected2] ________________
actual = {two, three}, expected = {2, 3}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E assert {two, three} == {2, 3}
E
E Extra items in the left set:
E two
E three
E Extra items in the right set:
E 2
E 3
E Use -v to get more diff
tests/tests.py:38: AssertionError
_______________ test_lazy_fixture_data_types[actual3-expected3] ________________
actual = [three, two], expected = [3, 2]
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E assert [three, two] == [3, 2]
E
E At index 0 diff: three != 3
E Use -v to get more diff
tests/tests.py:38: AssertionError
_______________ test_lazy_fixture_data_types[actual4-expected4] ________________
actual = {'first_level': {'not_lazy_fixture': 1, 'second_level': (one, one, two)}}
expected = {'first_level': {'not_lazy_fixture': 1, 'second_level': (1, 1, 2)}}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E AssertionError: assert {'first_level...e, one, two)}} == {'first_level...': (1, 1, 2)}}
E
E Differing items:
E {'first_level': {'not_lazy_fixture': 1, 'second_level': (one, one, two)}} != {'first_level': {'not_lazy_fixture': 1, 'second_level': (1, 1, 2)}}
E Use -v to get more diff
tests/tests.py:38: AssertionError
____________________ test_lazy_fixture_with_fixtures[item0] ____________________
item = four
@pytest.mark.parametrize("item", [lf("four")])
def test_lazy_fixture_with_fixtures(item):
> assert item == 4
E assert four == 4
tests/tests.py:43: AssertionError
___________ test_lazy_fixture_with_attrs[only_entity0-entity_value0] ___________
only_entity = entity, entity_value = entity.value
@pytest.mark.parametrize("only_entity,entity_value", [(lf("entity"), lf("entity.value"))])
def test_lazy_fixture_with_attrs(only_entity, entity_value):
> assert isinstance(only_entity, Entity)
E assert False
E + where False = isinstance(entity, Entity)
tests/tests.py:48: AssertionError
________________ test_lazy_fixture_callable_with_func[message0] ________________
message = format
@pytest.mark.parametrize(
"message",
[
lfc(
"There is two lazy fixture args, {} and {}! And one kwarg {field}! And also simple value {simple}".format,
lf("one"),
lf("two"),
field=lf("three"),
simple="value",
),
],
)
def test_lazy_fixture_callable_with_func(message):
> assert message == "There is two lazy fixture args, 1 and 2! And one kwarg 3! And also simple value value"
E AssertionError: assert format == 'There is two lazy fixture args, 1 and 2! And one kwarg 3! And also simple value value'
tests/tests.py:65: AssertionError
________________ test_lazy_fixture_callable_with_lf[formatted0] ________________
formatted = entity_format, entity = Entity(value=1)
@pytest.mark.parametrize("formatted", [lfc("entity_format", lf("entity"))])
def test_lazy_fixture_callable_with_lf(formatted, entity):
> assert formatted == {"value": entity.value}
E AssertionError: assert entity_format == {'value': 1}
tests/tests.py:70: AssertionError
_______________ test_lazy_fixture_callable_with_attr_lf[result0] _______________
result = entity.sum
@pytest.mark.parametrize("result", [lfc("entity.sum", lf("two"))])
def test_lazy_fixture_callable_with_attr_lf(result):
> assert result == 3
E assert entity.sum == 3
tests/tests.py:75: AssertionError
=========================== short test summary info ============================
FAILED tests/tests.py::test_lazy_fixture[first0-second0-4] - assert one == 1
FAILED tests/tests.py::test_lazy_fixture_data_types[actual0-expected0] - Asse...
FAILED tests/tests.py::test_lazy_fixture_data_types[actual1-expected1] - Asse...
FAILED tests/tests.py::test_lazy_fixture_data_types[actual2-expected2] - asse...
FAILED tests/tests.py::test_lazy_fixture_data_types[actual3-expected3] - asse...
FAILED tests/tests.py::test_lazy_fixture_data_types[actual4-expected4] - Asse...
FAILED tests/tests.py::test_lazy_fixture_with_fixtures[item0] - assert four == 4
FAILED tests/tests.py::test_lazy_fixture_with_attrs[only_entity0-entity_value0]
FAILED tests/tests.py::test_lazy_fixture_callable_with_func[message0] - Asser...
FAILED tests/tests.py::test_lazy_fixture_callable_with_lf[formatted0] - Asser...
FAILED tests/tests.py::test_lazy_fixture_callable_with_attr_lf[result0] - ass...
========================= 11 failed, 8 passed in 0.09s ========================= |
I tested 1.0.6 on OpenIndiana and all tests pass:
|
OK so what could be wrong and/or how can I try diagnose this issue? 🤔 |
I'm sorry, but I do not know your environment so I've no idea what might be wrong on your side. Maybe the difference is that I run tests in clean environment and you probably don't. I use the following command: |
Or |
I'm not using any
That output which I've provided is already with that env variable (as you already advised to use it) Here is pytest output with -vv:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-lazy-fixtures-1.0.6-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-lazy-fixtures-1.0.6-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network' -vv
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-lazy-fixtures-1.0.6
configfile: pyproject.toml
collected 19 items
tests/tests.py::test_lazy_fixture_repr PASSED [ 5%]
tests/tests.py::test_lazy_fixture_callable_repr PASSED [ 10%]
tests/tests.py::test_lazy_fixture[first0-second0-4] FAILED [ 15%]
tests/tests.py::test_lazy_fixture_data_types[actual0-expected0] FAILED [ 21%]
tests/tests.py::test_lazy_fixture_data_types[actual1-expected1] FAILED [ 26%]
tests/tests.py::test_lazy_fixture_data_types[actual2-expected2] FAILED [ 31%]
tests/tests.py::test_lazy_fixture_data_types[actual3-expected3] FAILED [ 36%]
tests/tests.py::test_lazy_fixture_data_types[actual4-expected4] FAILED [ 42%]
tests/tests.py::test_lazy_fixture_with_fixtures[item0] FAILED [ 47%]
tests/tests.py::test_lazy_fixture_with_attrs[only_entity0-entity_value0] FAILED [ 52%]
tests/tests.py::test_lazy_fixture_callable_with_func[message0] FAILED [ 57%]
tests/tests.py::test_lazy_fixture_callable_with_lf[formatted0] FAILED [ 63%]
tests/tests.py::test_lazy_fixture_callable_with_attr_lf[result0] FAILED [ 68%]
tests/tests.py::test[data0] PASSED [ 73%]
tests/tests.py::test_foo[fixture20] PASSED [ 78%]
tests/tests.py::test_foo[fixture21] PASSED [ 84%]
tests/tests.py::test_foo[fixture22] PASSED [ 89%]
tests/tests.py::test_foo[fixture23] PASSED [ 94%]
tests/tests.py::test_foo[fixture24] PASSED [100%]
========================================================================================= FAILURES ==========================================================================================
____________________________________________________________________________ test_lazy_fixture[first0-second0-4] ____________________________________________________________________________
first = one, second = two, other = 4
@pytest.mark.parametrize(("first", "second", "other"), [(lf("one"), lf("two"), 4)])
def test_lazy_fixture(first, second, other):
> assert first == 1
E assert one == 1
tests/tests.py:19: AssertionError
______________________________________________________________________ test_lazy_fixture_data_types[actual0-expected0] ______________________________________________________________________
actual = {'a': [one, two]}, expected = {'a': [1, 2]}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E AssertionError: assert {'a': [one, two]} == {'a': [1, 2]}
E
E Differing items:
E {'a': [one, two]} != {'a': [1, 2]}
E
E Full diff:
E {
E 'a': [
E - 1,
E ? ^
E + one,
E ? ^^^
E - 2,
E ? ^
E + two,
E ? ^^^
E ],
E }
tests/tests.py:38: AssertionError
______________________________________________________________________ test_lazy_fixture_data_types[actual1-expected1] ______________________________________________________________________
actual = {'a': {one, two}}, expected = {'a': {1, 2}}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E AssertionError: assert {'a': {one, two}} == {'a': {1, 2}}
E
E Differing items:
E {'a': {one, two}} != {'a': {1, 2}}
E
E Full diff:
E {
E 'a': {
E - 1,
E ? ^
E + two,
E ? ^^^
E - 2,
E ? ^
E + one,
E ? ^^^
E },
E }
tests/tests.py:38: AssertionError
______________________________________________________________________ test_lazy_fixture_data_types[actual2-expected2] ______________________________________________________________________
actual = {two, three}, expected = {2, 3}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E assert {two, three} == {2, 3}
E
E Extra items in the left set:
E two
E three
E Extra items in the right set:
E 2
E 3
E
E Full diff:
E {
E - 2,
E - 3,
E + two,
E + three,
E }
tests/tests.py:38: AssertionError
______________________________________________________________________ test_lazy_fixture_data_types[actual3-expected3] ______________________________________________________________________
actual = [three, two], expected = [3, 2]
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E assert [three, two] == [3, 2]
E
E At index 0 diff: three != 3
E
E Full diff:
E [
E - 3,
E - 2,
E + three,
E + two,
E ]
tests/tests.py:38: AssertionError
______________________________________________________________________ test_lazy_fixture_data_types[actual4-expected4] ______________________________________________________________________
actual = {'first_level': {'not_lazy_fixture': 1, 'second_level': (one, one, two)}}, expected = {'first_level': {'not_lazy_fixture': 1, 'second_level': (1, 1, 2)}}
@pytest.mark.parametrize(
("actual", "expected"),
[
({"a": [lf("one"), lf("two")]}, {"a": [1, 2]}),
({"a": {lf("one"), lf("two")}}, {"a": {1, 2}}),
({lf("three"), lf("two"), lf("three")}, {3, 2}),
([lf("three"), lf("two")], [3, 2]),
(
{"first_level": {"second_level": (lf("one"), lf("one"), lf("two")), "not_lazy_fixture": 1}},
{"first_level": {"second_level": (1, 1, 2), "not_lazy_fixture": 1}},
),
],
)
def test_lazy_fixture_data_types(actual, expected):
> assert actual == expected
E AssertionError: assert {'first_level': {'second_level': (one, one, two), 'not_lazy_fixture': 1}} == {'first_level': {'second_level': (1, 1, 2), 'not_lazy_fixture': 1}}
E
E Differing items:
E {'first_level': {'not_lazy_fixture': 1, 'second_level': (one, one, two)}} != {'first_level': {'not_lazy_fixture': 1, 'second_level': (1, 1, 2)}}
E
E Full diff:
E {
E 'first_level': {
E 'not_lazy_fixture': 1,
E 'second_level': (
E - 1,
E ? ^
E + one,
E ? ^^^
E - 1,
E ? ^
E + one,
E ? ^^^
E - 2,
E ? ^
E + two,
E ? ^^^
E ),
E },
E }
tests/tests.py:38: AssertionError
__________________________________________________________________________ test_lazy_fixture_with_fixtures[item0] ___________________________________________________________________________
item = four
@pytest.mark.parametrize("item", [lf("four")])
def test_lazy_fixture_with_fixtures(item):
> assert item == 4
E assert four == 4
tests/tests.py:43: AssertionError
_________________________________________________________________ test_lazy_fixture_with_attrs[only_entity0-entity_value0] __________________________________________________________________
only_entity = entity, entity_value = entity.value
@pytest.mark.parametrize("only_entity,entity_value", [(lf("entity"), lf("entity.value"))])
def test_lazy_fixture_with_attrs(only_entity, entity_value):
> assert isinstance(only_entity, Entity)
E assert False
E + where False = isinstance(entity, Entity)
tests/tests.py:48: AssertionError
______________________________________________________________________ test_lazy_fixture_callable_with_func[message0] _______________________________________________________________________
message = format
@pytest.mark.parametrize(
"message",
[
lfc(
"There is two lazy fixture args, {} and {}! And one kwarg {field}! And also simple value {simple}".format,
lf("one"),
lf("two"),
field=lf("three"),
simple="value",
),
],
)
def test_lazy_fixture_callable_with_func(message):
> assert message == "There is two lazy fixture args, 1 and 2! And one kwarg 3! And also simple value value"
E AssertionError: assert format == 'There is two lazy fixture args, 1 and 2! And one kwarg 3! And also simple value value'
tests/tests.py:65: AssertionError
______________________________________________________________________ test_lazy_fixture_callable_with_lf[formatted0] _______________________________________________________________________
formatted = entity_format, entity = Entity(value=1)
@pytest.mark.parametrize("formatted", [lfc("entity_format", lf("entity"))])
def test_lazy_fixture_callable_with_lf(formatted, entity):
> assert formatted == {"value": entity.value}
E AssertionError: assert entity_format == {'value': 1}
tests/tests.py:70: AssertionError
_____________________________________________________________________ test_lazy_fixture_callable_with_attr_lf[result0] ______________________________________________________________________
result = entity.sum
@pytest.mark.parametrize("result", [lfc("entity.sum", lf("two"))])
def test_lazy_fixture_callable_with_attr_lf(result):
> assert result == 3
E assert entity.sum == 3
tests/tests.py:75: AssertionError
================================================================================== short test summary info ==================================================================================
FAILED tests/tests.py::test_lazy_fixture[first0-second0-4] - assert one == 1
FAILED tests/tests.py::test_lazy_fixture_data_types[actual0-expected0] - AssertionError: assert {'a': [one, two]} == {'a': [1, 2]}
FAILED tests/tests.py::test_lazy_fixture_data_types[actual1-expected1] - AssertionError: assert {'a': {one, two}} == {'a': {1, 2}}
FAILED tests/tests.py::test_lazy_fixture_data_types[actual2-expected2] - assert {two, three} == {2, 3}
FAILED tests/tests.py::test_lazy_fixture_data_types[actual3-expected3] - assert [three, two] == [3, 2]
FAILED tests/tests.py::test_lazy_fixture_data_types[actual4-expected4] - AssertionError: assert {'first_level': {'second_level': (one, one, two), 'not_lazy_fixture': 1}} == {'first_level': {'second_level': (1, 1, 2), 'not_lazy_fixture': 1}}
FAILED tests/tests.py::test_lazy_fixture_with_fixtures[item0] - assert four == 4
FAILED tests/tests.py::test_lazy_fixture_with_attrs[only_entity0-entity_value0] - assert False
FAILED tests/tests.py::test_lazy_fixture_callable_with_func[message0] - AssertionError: assert format == 'There is two lazy fixture args, 1 and 2! And one kwarg 3! And also simple value value'
FAILED tests/tests.py::test_lazy_fixture_callable_with_lf[formatted0] - AssertionError: assert entity_format == {'value': 1}
FAILED tests/tests.py::test_lazy_fixture_callable_with_attr_lf[result0] - assert entity.sum == 3
=============================================================================== 11 failed, 8 passed in 0.17s ================================================================================ |
So looks lik test suite expects numbers and in my case are returned these numbers converted to text 🤔 |
Actually, in 1.0.6 you also have to set |
The key point was |
No, you don't. |
I meant if he's using |
Yep .. and that is what currently I have in package build procedure (for now I've added failing units to --deselect list) %check
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
%pytest %{!?with_failing_tests: \
--deselect tests/tests.py::test_lazy_fixture[first0-second0-4] \
--deselect tests/tests.py::test_lazy_fixture_callable_with_attr_lf[result0] \
--deselect tests/tests.py::test_lazy_fixture_callable_with_func[message0] \
--deselect tests/tests.py::test_lazy_fixture_callable_with_lf[formatted0] \
--deselect tests/tests.py::test_lazy_fixture_data_types[actual0-expected0] \
--deselect tests/tests.py::test_lazy_fixture_data_types[actual1-expected1] \
--deselect tests/tests.py::test_lazy_fixture_data_types[actual2-expected2] \
--deselect tests/tests.py::test_lazy_fixture_data_types[actual3-expected3] \
--deselect tests/tests.py::test_lazy_fixture_data_types[actual4-expected4] \
--deselect tests/tests.py::test_lazy_fixture_with_attrs[only_entity0-entity_value0] \
--deselect tests/tests.py::test_lazy_fixture_with_fixtures[item0] \
} |
@kloczek, your problems are entirely of your own doing. First it failed for you because the plugin was simultaneously being autoloaded by pytest and loaded explicitly via Now it's failing for you because it's not being loaded at all because you're disabling autoloading. On top of that, you're skipping all tests that actually test the plugin, which effectively makes your test run entirely meaningless. Either remove |
OK tested and it works now. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-lazy-fixtures-1.0.6-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-lazy-fixtures-1.0.6-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-lazy-fixtures-1.0.6
configfile: pyproject.toml
plugins: lazy-fixtures-1.0.6, mock-3.12.0
collected 24 items
tests/tests.py ........................ [100%]
==================================================================================== 24 passed in 0.15s ===================================================================================== |
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
List of installed modules in build env:
Please let me know if you need more details or want me to perform some diagnostics.
The text was updated successfully, but these errors were encountered: