summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_memoryview.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 08:51:18 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 08:51:18 (GMT)
commitab91fdef1f1e556203a2eee98ba7d379e4790de9 (patch)
tree6f8f00dc18cc5f2801a675df277c2c595eb85ec8 /Lib/test/test_memoryview.py
parentef82be368abdea8e8032500e7ecc3a22f5f07851 (diff)
downloadcpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.zip
cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.gz
cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.bz2
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
Diffstat (limited to 'Lib/test/test_memoryview.py')
-rw-r--r--Lib/test/test_memoryview.py10
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)