-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: stop using tmp_dir fixture in favor of pytest.tmp_path fixture #7412
tests: stop using tmp_dir fixture in favor of pytest.tmp_path fixture #7412
Conversation
a63b07c
to
dbbe6d4
Compare
rebased to master |
There's an old PR #7129 but From last year and it was not updated. |
As @radoering noted the current CI tests in windows has a similar fail with the other PR #7129. |
dbbe6d4
to
8c5afaf
Compare
08f14e5
to
2d40c5b
Compare
I have added some code for debugging the failed Windows pipelines because the error output is truncated.
https://github.com/python-poetry/poetry/actions/runs/4364500429/jobs/7631897284#step:14:2832 |
2d40c5b
to
a3540e4
Compare
Take a look here pytest-dev/pytest#8999 |
6bd32aa
to
b2d24c3
Compare
b882363
to
f9cbdc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor nitpicks for consistency. I think after that we are ready to merge. 😄
f9cbdc6
to
15ad512
Compare
#7784 kicks in and tells us something about the flakey CI! https://github.com/python-poetry/poetry/actions/runs/4669647501/jobs/8268387674?pr=7412
Not sure what to make of that to be honest, but it's some sort of progress Windows 3.9 is the one that's stuck on old virtualenv, possibly relevant |
It's the test case with the missing name in
Is it possible that the name of some temporary directory is used as package name and that if we are unlucky this name ends with a dash so that we get an invalid name? (Can't look for myself right now.) |
15ad512
to
d269554
Compare
I have rebased to pull it in. |
As previously discussed - #7412 (comment) - the pipeline was doing that already |
d269554
to
50615a4
Compare
Rebased due to conflict |
flakey test is on windows 3.10 this time, and mentions Given that this MR seems to be hitting this problem much more than any other branch, and the hint that it's to do with the name of a temporary directory... probably you need to get to the bottom of this one - or at least far enough to show that it's not related to this MR - before merging. |
It seems that the failure is really caused by this PR: After setting a breakpoint at poetry/tests/inspection/test_info.py Line 236 in 5a9da19
I noticed that If there is no name in Thus, the question is what change of this PR creates these two directories? |
OK, it's clear now: I suppose we should change poetry/tests/inspection/test_info.py Lines 38 to 39 in 5a9da19
- return Path(tmp_path.as_posix())
+ path = tmp_path / "source"
+ path.mkdir()
+ return path |
50615a4
to
a8fbb7b
Compare
Thanks a lot for the investigation. I don't think I would've been able to figure it out on my own, especially on Win. Is there a way to trigger CI re-run on GH, to make sure its not passing by chance since it was manifesting itself randomly? |
bf5f8f1
to
aa30b53
Compare
aa30b53
to
a6a7e76
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #6934
Added tests for changed code.Updated documentation for changed code.