Kaydet (Commit) 5b1abb7b authored tarafından Alexandre Vassalotti's avatar Alexandre Vassalotti

Backport test cases added in r73852.

üst 16a02473
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment