Closed Saran-nns closed 12 months ago
Hi!
To run the tests in colab you need to install pytest-lazy-fixture and use pytest (run either "!pytest" to run all of them or "!pytest tests/test_file_you_want_to_run.py" to run one at a time). Also note that this needs to be done in the main directory for pytest to find the right test files. pytest-lazy-fixture is included in requirements_dev.txt but since that also includes jupyter related packages which colab doesn't like I recommend just pip installing it seperately.
Hope this helps, Jakob
thanks Jakob
Hi team,
As part of review
Error Traceback:
Traceback (most recent call last): File "/content/Spikeometric/tests/test_stimulation.py", line 5, in <module> @pytest.mark.parametrize("stimulus", [pytest.lazy_fixture('regular_stimulus'), pytest.lazy_fixture('sin_stimulus'), pytest.lazy_fixture('poisson_stimulus')]) File "/usr/local/lib/python3.10/dist-packages/pytest/__init__.py", line 171, in __getattr__ raise AttributeError(f"module {__name__} has no attribute {name}") AttributeError: module pytest has no attribute lazy_fixture
Ref: https://colab.research.google.com/drive/1l8Y3So5uBXl4kA_6jvpkvyZOILVjdrHK#scrollTo=dXRS0vx6lJow
thanks Saran