Uh oh!
There was an error while loading. Please reload this page.
gh-109295: Skip test_generated_cases if different mount drives - #109308
Conversation
On Windows, skip the test if the current working directory and the Python source code directory have different mount drives. It happens if the temporary directory is on a different mount drive than the Python source code.
7f10fe4 to
4ad15efComparevstinner
commented
Sep 12, 2023
Example without the fix: With the fix: |
miss-islington
commented
Sep 12, 2023
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
miss-islington
commented
Sep 12, 2023
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
miss-islington
commented
Sep 12, 2023
Sorry, @vstinner, I could not cleanly backport this to |
miss-islington
commented
Sep 12, 2023
Sorry, @vstinner, I could not cleanly backport this to |
vstinner
commented
Sep 12, 2023
Python 3.11 and 3.12 are not affected: |
vstinner
commented
Sep 12, 2023
An alternative would be to change the current working directory while testing test_generated_cases, as done by test_pyexpat: #109233 But the problem is that the directory should be changed early when test_generated_cases.py is imported, before the first Tools/cases_generator/ import, and the old directory should be restore "later". But when is "later"? After the import? And then change again cwd while running tests using setUpModule()/tearDownModule()? Well, for me it was too complicated, and I made the minimum fix: just skip the test. |
…ython#109308) On Windows, skip the test if the current working directory and the Python source code directory have different mount drives. It happens if the temporary directory is on a different mount drive than the Python source code.
On Windows, skip the test if the current working directory and the Python source code directory have different mount drives. It happens if the temporary directory is on a different mount drive than the Python source code.