Skip to content

test_sys.test_intern() fails if run more than once in the same process #108963

Closed
@vstinner

Description

@vstinner

Bug report

Example:

$ ./python -m test test_sys test_sys -m test_intern -v
(...)
0:00:00 load avg: 1.60 Run tests sequentially
0:00:00 load avg: 1.60 [1/2] test_sys
test_intern (test.test_sys.SysModuleTest.test_intern) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK
0:00:00 load avg: 1.60 [2/2] test_sys
test_intern (test.test_sys.SysModuleTest.test_intern) ... FAIL

======================================================================
FAIL: test_intern (test.test_sys.SysModuleTest.test_intern)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/3.12/Lib/test/test_sys.py", line 687, in test_intern
    self.assertTrue(sys.intern(s) is s)
AssertionError: False is not true

----------------------------------------------------------------------
(...)

Result: FAILURE

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions