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
The change to the test directory introduced in #403 creates an issue when trying to match test filenames with model output filenames. E.g., tests/models/supply/test_heat.py and tests/models/demand/test_heat.py are not allowed simultaneously. One fix would be to flatten the structure and have tests/models/test_supply_heat.py and tests/models/test_demand_heat.py. The other is to repeat the parent directory name in the filename (tests/models/supply/test_heat_supply.py).
Version
1.2.0.dev
Relevant log output
import file mismatch:
imported module 'test_heat' has this __file__ attribute:
/Users/brynpickering/Repos/euro-calliope/tests/model/timeseries/demand/test_heat.py
which is not the same as the test file we want to collect:
/Users/brynpickering/Repos/euro-calliope/tests/model/timeseries/supply/test_heat.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
The text was updated successfully, but these errors were encountered:
I see. This is a restriction by pytest. To be fair, the case that you ran into in #408 is a bit of a special case. So maybe we don't necessarily need to change anything for most cases and handle the special cases the way you've handled them over there (the second of your two options above)?
What happened?
The change to the test directory introduced in #403 creates an issue when trying to match test filenames with model output filenames. E.g.,
tests/models/supply/test_heat.py
andtests/models/demand/test_heat.py
are not allowed simultaneously. One fix would be to flatten the structure and havetests/models/test_supply_heat.py
andtests/models/test_demand_heat.py
. The other is to repeat the parent directory name in the filename (tests/models/supply/test_heat_supply.py
).Version
1.2.0.dev
Relevant log output
The text was updated successfully, but these errors were encountered: