self-test fails if __pycache__ exists from prior run

Bug #1877788 reported by Bryce Harrington
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
New
Undecided
Unassigned

Bug Description

When running `./snap-wrappers/wrappers/git-ubuntu-self-test` multiple times on a git checkout (e.g. testing each commit in a MP), each subsequent run results in a series of errors like:

__________________________________ ERROR collecting gitubuntu/source_information.py __________________________________
import file mismatch:
imported module 'gitubuntu.source_information' has this __file__ attribute:
  /tmp/ci-20200509-ao1OztATiR/gitubuntu/source_information.py
which is not the same as the test file we want to collect:
  /tmp/ci-20200509-Otl7cY1ey8/gitubuntu/source_information.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules

The hint provided is accurate: Simply `rm -rf ../usd-importer/gitubuntu/__pycache__` and re-run the test and it works. It would be more convenient if the test runner could do this for us. Guessing this might relate to how running this through the snap install behaves.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.