Pytest uses wrong base directory for tests selection #10967
-
Suppose i have a following structure, inside Pycharm Project directory
In
I can't find anything in regards to this Inherently, all error messages are pointing towards tests of other projects, like so:
Pycharm seems to launch them with correct working directory set, via
But then collected tests all reference external folder
How can i stop pytest from seeking folders above project root? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
As an added detail, it does that only for identical test copies (files that were not changed) Still have no idea why it even tries to discover tests from folders above working directory though |
Beta Was this translation helpful? Give feedback.
-
This looks like a import path conflict, either add loads of |
Beta Was this translation helpful? Give feedback.
Well, for now adding
# ot3_webserver
as a first line to every test file of ot3_webserver project test suite resolved the issue.Kinda dirty, but as long as it works i guess