From 5b1abb7bb0553c0f9ed41bf75d1003eb47a86013 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Sun, 5 Jul 2009 06:33:41 +0000 Subject: [PATCH] Backport test cases added in r73852. --- Lib/test/test_array.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 643393527d7..0ef5f9e518b 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -278,6 +278,12 @@ class BaseTest(unittest.TestCase): a, array.array(self.typecode, self.example[::-1]+2*self.example) ) + a = array.array(self.typecode, self.example) + a += a + self.assertEqual( + a, + array.array(self.typecode, self.example + self.example) + ) b = array.array(self.badtypecode()) self.assertRaises(TypeError, a.__add__, b) @@ -675,6 +681,13 @@ class BaseTest(unittest.TestCase): array.array(self.typecode, self.example+self.example[::-1]) ) + a = array.array(self.typecode, self.example) + a.extend(a) + self.assertEqual( + a, + array.array(self.typecode, self.example+self.example) + ) + b = array.array(self.badtypecode()) self.assertRaises(TypeError, a.extend, b)