Skip to content

Full path in .pyc files causes fixtures not to be found #7890

Answered by beenje
beenje asked this question in General
Discussion options

You must be logged in to vote

To summarise, it seems the full path of the files is used inside the pyc files instead of relative path. This isn't a platform issue. It can easily be reproduced using docker by mounting the same directory in 2 different locations:

$ docker run --rm -it -v $(pwd):/app1 -v $(pwd):/app2 beenje/test-pytest-factoryboy bash
dev@1eef1e791dd8:/app$ cd /app1
dev@1eef1e791dd8:/app1$ rm -rf tests/__pycache__/
dev@1eef1e791dd8:/app1$ pytest
========================================================================== test session starts ==========================================================================
platform linux -- Python 3.8.6, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
rootdir: /app1
plugins:…

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nicoddemus
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #7890 on October 18, 2020 21:23.