Skip to content
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

./python.exe -m test test_types test_inspect fails as (env changed) #128694

Open
sobolevn opened this issue Jan 9, 2025 · 2 comments
Open

./python.exe -m test test_types test_inspect fails as (env changed) #128694

sobolevn opened this issue Jan 9, 2025 · 2 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Jan 9, 2025

Bug report

» ./python.exe -m test test_types test_inspect                                  
Using random seed: 1107570136
0:00:00 load avg: 3.01 Run 2 tests sequentially in a single process
0:00:00 load avg: 3.01 [1/2] test_types
0:00:00 load avg: 3.01 [2/2] test_inspect.test_inspect
Warning -- asyncio.events._event_loop_policy was modified by test_inspect.test_inspect
Warning --   Before: None
Warning --   After:  <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 0x102437760> 
test_inspect.test_inspect failed (env changed)

== Tests result: SUCCESS ==

1 test altered the execution environment (env changed):
    test_inspect.test_inspect

1 test OK.

Total duration: 1.0 sec
Total tests: run=473
Total test files: run=2/2 env_changed=1
Result: SUCCESS

I am working on the fix.

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Jan 9, 2025
@sobolevn sobolevn self-assigned this Jan 9, 2025
@sobolevn
Copy link
Member Author

sobolevn commented Jan 9, 2025

test_types.py can only contain import unittest.mock to trigger this problem.

@sobolevn
Copy link
Member Author

sobolevn commented Jan 9, 2025

Because import asyncio is called in import unittest.mock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant