diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 (GMT) |
commit | c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9 (patch) | |
tree | 6350dab0b481e6de307dc4e043c6230f463a9ca7 /Lib/test/test_memoryview.py | |
parent | 98d23f2e065713ccfbc07d9a0b65f737a212bfb5 (diff) | |
download | cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.zip cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.gz cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.bz2 |
convert old fail* assertions to assert*
Diffstat (limited to 'Lib/test/test_memoryview.py')
-rw-r--r-- | Lib/test/test_memoryview.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_memoryview.py b/Lib/test/test_memoryview.py index 31bfa62..abda678 100644 --- a/Lib/test/test_memoryview.py +++ b/Lib/test/test_memoryview.py @@ -28,7 +28,7 @@ class AbstractMemoryTests: oldrefcount = sys.getrefcount(b) m = self._view(b) self.assertEquals(m[0], item(b"a")) - self.assert_(isinstance(m[0], bytes), type(m[0])) + self.assertTrue(isinstance(m[0], bytes), type(m[0])) self.assertEquals(m[5], item(b"f")) self.assertEquals(m[-1], item(b"f")) self.assertEquals(m[-6], item(b"a")) @@ -119,7 +119,7 @@ class AbstractMemoryTests: expected = b"".join( self.getitem_type(bytes([c])) for c in b"abcdef") self.assertEquals(b, expected) - self.assert_(isinstance(b, bytes), type(b)) + self.assertTrue(isinstance(b, bytes), type(b)) def test_tolist(self): for tp in self._types: @@ -214,7 +214,7 @@ class AbstractMemoryTests: b = m = o = None # The cycle must be broken gc.collect() - self.assert_(wr() is None, wr()) + self.assertTrue(wr() is None, wr()) # Variations on source objects for the buffer: bytes-like objects, then arrays @@ -291,8 +291,8 @@ class BytesMemoryviewTest(unittest.TestCase, def test_constructor(self): for tp in self._types: ob = tp(self._source) - self.assert_(memoryview(ob)) - self.assert_(memoryview(object=ob)) + self.assertTrue(memoryview(ob)) + self.assertTrue(memoryview(object=ob)) self.assertRaises(TypeError, memoryview) self.assertRaises(TypeError, memoryview, ob, ob) self.assertRaises(TypeError, memoryview, argument=ob) |