Apr-20-2020, 04:39 PM
I'm trying to implement continuous integration unit test with circleCI and pytest. I think I have everything setup properly at this point, and I can run the unit tests locally with the command python -m pytest.
But when I do that through circleCI I get:
_____________________ ERROR collecting test/test_sample.py _____________________
/Active-Learning/
--src/
----source.py
--test/
----test_sample.py
I don't have any pyc files as far as I can see. So I'm not sure what is going on.
But when I do that through circleCI I get:
_____________________ ERROR collecting test/test_sample.py _____________________
Error:import file mismatch:
imported module 'test_sample' has this __file__ attribute:
/home/circleci/Active-Learning/src/active-learning/test/test_sample.py
which is not the same as the test file we want to collect:
/home/circleci/Active-Learning/test/test_sample.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
My project structure is:/Active-Learning/
--src/
----source.py
--test/
----test_sample.py
I don't have any pyc files as far as I can see. So I'm not sure what is going on.