if using PyCharm IDE, test_step() function should be renamed to something else. #179
fivefishstudios
started this conversation in
General
Replies: 1 comment
-
Thank you for the heads up! I didn't know this (I don't use PyCharm, mostly VS Code + Jupyter Notebooks). Good idea on the rename to PS I changed the category of this Discussion to "General" rather than "Q&A" as I think it suits it better. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I discovered something. The function name format of 'test******' seems to trigger a keyword conflict when using PyCharm as the IDE.
The PyCharm IDE thinks you want to run some kind of TEST on your Python program and spits out an error related to test fixture not being available
available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory> use 'pytest --fixtures [testpath]' for help on them.
Renaming the function to something else, like eval_step() gets rid of the error message and allows normal program execution.
This problem does not happen if you're just using Jupyter notebooks. I understand this problem only happens if you're using PyCharm IDE and trying to create a stand-alone .py program.
Beta Was this translation helpful? Give feedback.
All reactions