Bug report
Reader.run_hooks() imports _pyrepl._threading_handler on the first call if threading is already imported.
TestPyReplModuleCompleter.test_attribute_completion collects the modules imported while the reader runs and compares them with the modules the completer is expected to import, so all 17 subtests fail:
AssertionError: Items in the first set but not the second:
'_pyrepl._threading_handler'
./python -m unittest test.test_pyrepl.test_pyrepl.TestPyReplModuleCompleter.test_attribute_completion
Importing _pyrepl._threading_handler before running the test makes it pass.
Linked PRs
Bug report
Reader.run_hooks()imports_pyrepl._threading_handleron the first call ifthreadingis already imported.TestPyReplModuleCompleter.test_attribute_completioncollects the modules imported while the reader runs and compares them with the modules the completer is expected to import, so all 17 subtests fail:Importing
_pyrepl._threading_handlerbefore running the test makes it pass.Linked PRs