Various tests cleanup: check_warnings/check_py3k_warnings, unittest.assert* and setUp/tearDown.
diff --git a/Lib/test/test_index.py b/Lib/test/test_index.py
index 84d83fb..abc8041 100644
--- a/Lib/test/test_index.py
+++ b/Lib/test/test_index.py
@@ -170,7 +170,7 @@
lst = [5, 6, 7, 8, 9, 11]
l2 = lst.__imul__(self.n)
- self.assertTrue(l2 is lst)
+ self.assertIs(l2, lst)
self.assertEqual(lst, [5, 6, 7, 8, 9, 11] * 3)
@@ -214,6 +214,9 @@
class StringTestCase(SeqTestCase):
seq = "this is a test"
+class ByteArrayTestCase(SeqTestCase):
+ seq = bytearray("this is a test")
+
class UnicodeTestCase(SeqTestCase):
seq = u"this is a test"
@@ -265,7 +268,7 @@
def _getslice_helper_deprecated(self, base):
class GetItem(base):
def __len__(self):
- return maxint #cannot return long here
+ return maxint # cannot return long here
def __getitem__(self, key):
return key
def __getslice__(self, i, j):
@@ -299,6 +302,7 @@
BaseTestCase,
ListTestCase,
TupleTestCase,
+ ByteArrayTestCase,
StringTestCase,
UnicodeTestCase,
ClassicSeqTestCase,