Actually run these tests from regrtest.py.
There was no test_main() and the main body was protected
by if __name__ == '__main__' so the test didn't happen
on import either.
diff --git a/Lib/test/test_importhooks.py b/Lib/test/test_importhooks.py
index 070b578..4191a17 100644
--- a/Lib/test/test_importhooks.py
+++ b/Lib/test/test_importhooks.py
@@ -199,6 +199,8 @@
m = __import__(mname, globals(), locals(), ["__dummy__"])
m.__loader__ # to make sure we actually handled the import
+def test_main():
+ test_support.run_unittest(ImportHooksTestCase)
if __name__ == "__main__":
- test_support.run_unittest(ImportHooksTestCase)
+ test_main()