diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-09-11 11:05:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-11 11:05:30 (GMT) |
commit | 60b8341d07649194aa73108369a1e04ed1848794 (patch) | |
tree | 31baf5479e4001097bff00754bc7ec36cb3fef94 | |
parent | 0abc935086931d4915ea3c45cffffecb31e7a45c (diff) | |
download | cpython-60b8341d07649194aa73108369a1e04ed1848794.zip cpython-60b8341d07649194aa73108369a1e04ed1848794.tar.gz cpython-60b8341d07649194aa73108369a1e04ed1848794.tar.bz2 |
Better integration of doctest and unittest in test_ctypes.test_objects (GH-108922)
Better integration of docrtest and unittest in test_ctypes.test_objects
-rw-r--r-- | Lib/test/test_ctypes/test_objects.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_ctypes/test_objects.py b/Lib/test/test_ctypes/test_objects.py index 23c92b0..fb01421 100644 --- a/Lib/test/test_ctypes/test_objects.py +++ b/Lib/test/test_ctypes/test_objects.py @@ -55,14 +55,12 @@ of 'x' ('_b_base_' is either None, or the root object owning the memory block): import doctest import unittest -import test.test_ctypes.test_objects -class TestCase(unittest.TestCase): - def test(self): - failures, tests = doctest.testmod(test.test_ctypes.test_objects) - self.assertFalse(failures, 'doctests failed, see output above') +def load_tests(loader, tests, pattern): + tests.addTest(doctest.DocTestSuite()) + return tests if __name__ == '__main__': - doctest.testmod(test.test_ctypes.test_objects) + unittest.main() |