szabgab · GitHub

As I have not found instructions how to do that I might be trying to run the test incorrectly, but this is what I get now:

$ pytest  examples.py
============================= test session starts ==============================
platform linux -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
Test order randomisation NOT enabled. Enable with --random-order or --random-order-bucket=<bucket_type>
rootdir: /home/gabor/os/MoreBeautifulPython
plugins: hydra-core-1.2.0, random-order-1.0.4, xdist-2.5.0, forked-1.4.0, anyio-3.6.1
collected 2 items
examples.py EE                                                           [100%]
==================================== ERRORS ====================================
____________________ ERROR at setup of test_sleep_and_fail _____________________
file /home/gabor/os/MoreBeautifulPython/examples.py, line 11
  def test_sleep_and_fail(x, fail_rate=0, running_time=0.2):
E       fixture 'x' not found
>       available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, hydra_restore_singletons, hydra_sweep_runner, hydra_task_runner, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, worker_id
>       use 'pytest --fixtures [testpath]' for help on them.
/home/gabor/os/MoreBeautifulPython/examples.py:11
____________________ ERROR at setup of test_read_from_list _____________________
file /home/gabor/os/MoreBeautifulPython/examples.py, line 17
  def test_read_from_list(idx, vec):
E       fixture 'idx' not found
>       available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, hydra_restore_singletons, hydra_sweep_runner, hydra_task_runner, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, worker_id
>       use 'pytest --fixtures [testpath]' for help on them.
/home/gabor/os/MoreBeautifulPython/examples.py:17
=========================== short test summary info ============================
ERROR examples.py::test_sleep_and_fail
ERROR examples.py::test_read_from_list
============================== 2 errors in 0.02s ===============================

Read the original on github.com ↗