Skip to content

Commit

Permalink
Better integration of doctest and unittest in test_ctypes.test_objects (
Browse files Browse the repository at this point in the history
pythonGH-108922)

Better integration of docrtest and unittest in test_ctypes.test_objects
  • Loading branch information
serhiy-storchaka authored Sep 11, 2023
1 parent 0abc935 commit 60b8341
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Lib/test/test_ctypes/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@

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()

0 comments on commit 60b8341

Please sign in to comment.