aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_extcall.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-09-20 11:36:57 +0300
committerGitHub <noreply@github.com>2021-09-20 11:36:57 +0300
commita856364cc920d8b16750fd1fadc902efb509754c (patch)
tree1f5f618d8ad0e18fd8718bc8cfaf478cd26280be /Lib/test/test_extcall.py
parent5e2c32e08ed77081cabd9d51f0589f81c1572732 (diff)
downloadcpython-a856364cc920d8b16750fd1fadc902efb509754c.tar.gz
cpython-a856364cc920d8b16750fd1fadc902efb509754c.zip
bpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468)
Alo use load_tests() for adding tests.
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r--Lib/test/test_extcall.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py
index 4205ca82222..13265ea0d8c 100644
--- a/Lib/test/test_extcall.py
+++ b/Lib/test/test_extcall.py
@@ -520,11 +520,14 @@ Same with keyword only args:
"""
-import sys
+import doctest
+import unittest
from test import support
-def test_main():
- support.run_doctest(sys.modules[__name__], True)
+def load_tests(loader, tests, pattern):
+ tests.addTest(doctest.DocTestSuite())
+ return tests
+
if __name__ == '__main__':
- test_main()
+ unittest.main()