You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple tests failing when invoked directly via ./python Lib/test/... #131290
Hello, I am currently running "Lib/test/test_metaclass.py".
Running it directly (./python Lib/test/test_metaclass.py) works in the global namespace (main), so module becomes 'main'. This creates a conflict since the module should be called "test.test_metaclass".
Activity
MaximGit1 commentedon Mar 16, 2025
Hello i would like to take for this
sobolevn commentedon Mar 16, 2025
@MaximGit1 Thank you, please go ahead and ask any questions you have :)
MaximGit1 commentedon Mar 17, 2025
Hello, I am currently running "Lib/test/test_metaclass.py".
Running it directly (./python Lib/test/test_metaclass.py) works in the global namespace (main), so module becomes 'main'. This creates a conflict since the module should be called "test.test_metaclass".
To fix this, I decided to do this.
I think this is the best solution because I don't change the logic of the tests. How good do you think this solution is?
MaximGit1 commentedon Mar 17, 2025
@sobolevn I finished
vstinner commentedon Mar 17, 2025
For regrtest, I would prefer this fix:
gh-131290: ensure that test files can be executed as standalone scrip…
Eclips4 commentedon Apr 12, 2025
Thank you @MaximGit1 for fixing this!