[Python-checkins] r73854 - python/trunk/Lib/test/test_array.py

alexandre.vassalotti python-checkins at python.org
Sun Jul 5 08:33:41 CEST 2009


Author: alexandre.vassalotti
Date: Sun Jul 5 08:33:41 2009
New Revision: 73854
Log:
Backport test cases added in r73852.
Modified:
 python/trunk/Lib/test/test_array.py
Modified: python/trunk/Lib/test/test_array.py
==============================================================================
--- python/trunk/Lib/test/test_array.py	(original)
+++ python/trunk/Lib/test/test_array.py	Sun Jul 5 08:33:41 2009
@@ -278,6 +278,12 @@
 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 @@
 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)
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /