How to execute pytest in a tox environment with the package being in the root directory? #10582
Replies: 3 comments 3 replies
-
Never ever have pytest external It was pure luck that anything worked at all You where running tests with a different python/pytest not under tox controls Allow external is to enable usage of non python executables if necessary, in almost every case it's wrong to use it for stuff pip can install |
Beta Was this translation helpful? Give feedback.
-
I can't see much wrong with what you've shown (other than the |
Beta Was this translation helpful? Give feedback.
-
I know not much about tox. How do the you You should transform your folder structure into src-Layout. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So if I have a directory structure like this:
And my pyproject.toml config:
Pytest is running the tests on the source code in package/ instead of the environment inside of .tox. I used to use the src/ directory structure, but since I'm adding Rust extensions, I can't use that anymore.
Is there a way I can get pytest to only run tests on the environments in .tox?
Beta Was this translation helpful? Give feedback.
All reactions