diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-08-02 12:18:53 (GMT) | 
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-08-02 12:18:53 (GMT) | 
| commit | 44427added96c38f87b065e2aafcf729bc04532b (patch) | |
| tree | 48206109c8b94cff1789e5c8570c6a25f9b261a7 /Lib/test/test_memoryio.py | |
| parent | 9dd6ddc7875100ff7f9b223061b3748bd20de650 (diff) | |
| parent | b064f1e94f615ae6a9cfa2ce288b1b102dc9d870 (diff) | |
| download | cpython-44427added96c38f87b065e2aafcf729bc04532b.zip cpython-44427added96c38f87b065e2aafcf729bc04532b.tar.gz cpython-44427added96c38f87b065e2aafcf729bc04532b.tar.bz2 | |
Issue #20557: Use specific asserts in io tests.
Diffstat (limited to 'Lib/test/test_memoryio.py')
| -rw-r--r-- | Lib/test/test_memoryio.py | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py index 3f9928b..df4ff7a 100644 --- a/Lib/test/test_memoryio.py +++ b/Lib/test/test_memoryio.py @@ -694,7 +694,8 @@ class CBytesIOTest(PyBytesIOTest):          self.assertEqual(len(state), 3)          bytearray(state[0]) # Check if state[0] supports the buffer interface.          self.assertIsInstance(state[1], int) -        self.assertTrue(isinstance(state[2], dict) or state[2] is None) +        if state[2] is not None: +            self.assertIsInstance(state[2], dict)          memio.close()          self.assertRaises(ValueError, memio.__getstate__) @@ -794,7 +795,8 @@ class CStringIOTest(PyStringIOTest):          self.assertIsInstance(state[0], str)          self.assertIsInstance(state[1], str)          self.assertIsInstance(state[2], int) -        self.assertTrue(isinstance(state[3], dict) or state[3] is None) +        if state[3] is not None: +            self.assertIsInstance(state[3], dict)          memio.close()          self.assertRaises(ValueError, memio.__getstate__) | 
