============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 Using --randomly-seed=2636061782 rootdir: /build/python-pytest-randomly/src/pytest-randomly-3.9.0 plugins: randomly-3.9.0, xdist-2.5.0, forked-1.4.0, Faker-8.16.0 collected 34 items / 1 deselected / 33 selected tests/test_pytest_randomly.py ....F............................ [100%] =================================== FAILURES =================================== _______________________________ test_factory_boy _______________________________ ourtestdir = def test_factory_boy(ourtestdir): """ Rather than set up factories etc., just check the random generator it uses is set between two tests to output the same number. """ ourtestdir.makepyfile( test_one=""" from factory.random import randgen def test_a(): test_a.num = randgen.random() if hasattr(test_b, 'num'): assert test_a.num == test_b.num def test_b(): test_b.num = randgen.random() if hasattr(test_a, 'num'): assert test_b.num == test_a.num """ ) out = ourtestdir.runpytest("--randomly-seed=1") > out.assert_outcomes(passed=2) E AssertionError: assert {'errors': 1,...pped': 0, ...} == {'errors': 0,...pped': 0, ...} E Omitting 4 identical items, use -vv to show E Differing items: E {'errors': 1} != {'errors': 0} E {'passed': 0} != {'passed': 2} E Use -v to get the full diff /build/python-pytest-randomly/src/pytest-randomly-3.9.0/tests/test_pytest_randomly.py:586: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 Using --randomly-seed=1 rootdir: /tmp/pytest-of-builduser/pytest-0/test_factory_boy0, configfile: pytest.ini plugins: randomly-3.9.0, xdist-2.5.0, forked-1.4.0, Faker-8.16.0 collected 0 items / 1 error ==================================== ERRORS ==================================== _________________________ ERROR collecting test_one.py _________________________ ImportError while importing test module '/tmp/pytest-of-builduser/pytest-0/test_factory_boy0/test_one.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test_one.py:1: in from factory.random import randgen E ModuleNotFoundError: No module named 'factory' =========================== short test summary info ============================ ERROR test_one.py !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 0.21s =============================== =========================== short test summary info ============================ FAILED tests/test_pytest_randomly.py::test_factory_boy - AssertionError: asse... ================= 1 failed, 32 passed, 1 deselected in 28.46s ================== ==> ERROR: A failure occurred in check().  Aborting...