bioAI-Oslo / Spikeometric

Spiking Neural Network Simulator based on Generalized Linear Models
GNU General Public License v3.0
7 stars 1 forks source link

Automated tests for device, stimulation and models failed #14

Closed Saran-nns closed 12 months ago

Saran-nns commented 1 year ago

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

JakobSonstebo commented 1 year 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

Saran-nns commented 12 months ago

thanks Jakob