From c29cc6a8f27bcbe74772b691a352c8e299a6abfa Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 4 Dec 2010 11:02:04 +0000 Subject: #1569291: speed up array.repeat() by making only O(log n) memcpy() calls; the code follows unicode_repeat. --- Lib/test/test_array.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/test/test_array.py') diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 1cce991318..b44eb97893 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -504,6 +504,12 @@ class BaseTest(unittest.TestCase): array.array(self.typecode) ) + a = 5 * array.array(self.typecode, self.example[:1]) + self.assertEqual( + a, + array.array(self.typecode, [a[0]] * 5) + ) + self.assertRaises(TypeError, a.__mul__, "bad") def test_imul(self): -- cgit v1.2.1