summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_memoryview.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_memoryview.py b/Lib/test/test_memoryview.py
index 6ca23fc..8e56df9 100644
--- a/Lib/test/test_memoryview.py
+++ b/Lib/test/test_memoryview.py
@@ -111,6 +111,15 @@ class AbstractMemoryTests:
m = None
self.assertEquals(sys.getrefcount(b), oldrefcount)
+ def test_delitem(self):
+ for tp in self._types:
+ b = tp(self._source)
+ m = self._view(b)
+ with self.assertRaises(TypeError):
+ del m[1]
+ with self.assertRaises(TypeError):
+ del m[1:4]
+
def test_tobytes(self):
for tp in self._types:
m = self._view(tp(self._source))