Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Lib/test/libregrtest/runtest.py
  • Loading branch information
serhiy-storchaka authored Sep 5, 2023
commit 8e2ef4e579640ec865cbce2c21943f4c405996f7
4 changes: 3 additions & 1 deletion Lib/test/libregrtest/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,9 @@ def _load_run_test(result: TestResult, ns: Namespace) -> None:

test_mod = importlib.import_module(module_name)

assert not hasattr(test_mod, "test_main")
if hasattr(test_mod, "test_main"):
# https://github.com/python/cpython/issues/89392
raise Exception("Module {result.test_name} defines test_main() which is no longer supported by regrtest")
def test_func():
return run_unittest(test_mod)

Expand Down