problem importing tests
module when running unit test
#4097
-
I have a developer install of pybamm, and I'm trying to run a test on a recent branch off the (note I'm in a venv that has pybamm installed like so
I'm not sure why its trying to look in
which is weird cause there is definitelly a subdir called Does anyone know why this would be happening? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
A few years ago we had issues with |
Beta Was this translation helpful? Give feedback.
-
I have faced this earlier, I remember that this started when #2833 was fixed but I never opened an issue about it – it's mostly just about how Python imports work, I feel. A way to run individual tests is to use python -m pytest tests/test_module.py::TestClass::test_method and another method is to use the |
Beta Was this translation helpful? Give feedback.
-
yea, I tried
|
Beta Was this translation helpful? Give feedback.
-
only python -m unittest tests.unit.test_solvers.test_casadi_solver |
Beta Was this translation helpful? Give feedback.
-
That's quite strange, Parallel
Serial
|
Beta Was this translation helpful? Give feedback.
only
unittest
seems to work ok: