Backport test cases added in r73852.
This commit is contained in:
parent
16a0247393
commit
5b1abb7bb0
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue