Handle os.chdir() during collection#4317
Conversation
Codecov Report
@@ Coverage Diff @@
## features #4317 +/- ##
============================================
+ Coverage 95.84% 95.84% +<.01%
============================================
Files 111 111
Lines 24888 24895 +7
Branches 2427 2427
============================================
+ Hits 23854 23861 +7
Misses 737 737
Partials 297 297
Continue to review full report at Codecov.
|
| if not args: | ||
| cwd = os.getcwd() | ||
| if cwd == self.rootdir: | ||
| if self.cwd == self.rootdir: |
There was a problem hiding this comment.
i just noticed this one - its "incorrect"
if test-paths is relative to the original cwd, then the result is entirely incorrect
its absolutely necessary to trigger a warning there - fundamentally a testsuite that changes the cwd at import time for bits of the suite already is broken and users should rectify that
There was a problem hiding this comment.
@RonnyPfannschmidt
Ah.. so this should make testpaths absolute then probably.
I agree that os.chdir during import etc is bad, but it seemed easy enough to work around / fix this.
Will create a follow-up.
No description provided.