You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running ctest -V -R pytest_coreneuron::basic_tests_py results in almost 1700 lines of output, and this makes it very hard to debug the tests when there's an actual error. We can use pdb for interactive debugging by just inserting a breakpoint() somewhere in the test file (if we know where the error could be), or running python -m pdb -m pytest [args] (if we don't), completely eliminating the need for any print statements.
Note that this applies to all Python-based tests, not just pytest_coreneuron::basic_tests_py.
An alternative would be to use some kind of a flag (env variable maybe?) to toggle enabling output to stdout/stderr in the tests.
The text was updated successfully, but these errors were encountered:
, where printf_callback is a function pointer and there's an infrastructure to set the pointer to something else.
In those cases one could try to register a different callback, that just prints to a string (that we then ignore or inspect to make sure it contain the word "ERROR").
Running
ctest -V -R pytest_coreneuron::basic_tests_py
results in almost 1700 lines of output, and this makes it very hard to debug the tests when there's an actual error. We can usepdb
for interactive debugging by just inserting abreakpoint()
somewhere in the test file (if we know where the error could be), or runningpython -m pdb -m pytest [args]
(if we don't), completely eliminating the need for anyprint
statements.Note that this applies to all Python-based tests, not just
pytest_coreneuron::basic_tests_py
.An alternative would be to use some kind of a flag (env variable maybe?) to toggle enabling output to stdout/stderr in the tests.
The text was updated successfully, but these errors were encountered: