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
Next Next commit
Update test_objects
  • Loading branch information
vstinner committed Jun 20, 2022
commit a1ea2207b309750ee0cc155c9da9347b1fee4454
8 changes: 4 additions & 4 deletions Lib/test/test_ctypes/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
of 'x' ('_b_base_' is either None, or the root object owning the memory block):

>>> print(x.array._b_base_) # doctest: +ELLIPSIS
<ctypes.test.test_objects.X object at 0x...>
<test.test_ctypes.test_objects.X object at 0x...>
>>>

>>> x.array[0] = b'spam spam spam'
Expand All @@ -56,12 +56,12 @@

import unittest, doctest

import ctypes.test.test_objects
import test.test_ctypes.test_objects

class TestCase(unittest.TestCase):
def test(self):
failures, tests = doctest.testmod(ctypes.test.test_objects)
failures, tests = doctest.testmod(test.test_ctypes.test_objects)
self.assertFalse(failures, 'doctests failed, see output above')

if __name__ == '__main__':
doctest.testmod(ctypes.test.test_objects)
doctest.testmod(test.test_ctypes.test_objects)