Skip to content

test_asyncio and test_compileall leak temporary files/directories #109295

Closed
@vstinner

Description

@vstinner

Using PR #109290 fix, I found that the two following tests leak temporary files/directories.

test_compileall:

$ ./python -m test -j1 test_compileall --fail-env-changed -m test.test_compileall.CompileallTestsWithSourceEpoch.test_ddir_empty_multiple_workers
0:00:00 load avg: 0.81 Run tests in parallel using 1 child processes
0:00:01 load avg: 0.81 [1/1/1] test_compileall failed (env changed)
Warning -- files was modified by test_compileall
Warning --   Before: []
Warning --   After:  ['pymp-kmfq1ivj/'] 
Warning -- files was modified by test_compileall
Warning --   Before: []
Warning --   After:  ['pymp-kmfq1ivj/']

== Tests result: ENV CHANGED ==

1 test altered the execution environment:
    test_compileall

Total duration: 1.2 sec
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered) env_changed=1
Result: ENV CHANGED

test.test_asyncio.test_events:

$ ./python -m test -j1 test.test_asyncio.test_events --fail-env-changed -m test.test_asyncio.test_events.TestPyGetEventLoop.test_get_event_loop_new_process 
0:00:00 load avg: 0.65 Run tests in parallel using 1 child processes
0:00:01 load avg: 0.65 [1/1/1] test.test_asyncio.test_events failed (env changed)
Warning -- files was modified by test.test_asyncio.test_events
Warning --   Before: []
Warning --   After:  ['pymp-tvmenicy/'] 
Warning -- files was modified by test.test_asyncio.test_events
Warning --   Before: []
Warning --   After:  ['pymp-tvmenicy/']

== Tests result: ENV CHANGED ==

1 test altered the execution environment:
    test.test_asyncio.test_events

Total duration: 1.4 sec
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered) env_changed=1
Result: ENV CHANGED

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions