summaryrefslogtreecommitdiffstats
path: root/Lib/test/seq_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/seq_tests.py')
-rw-r--r--Lib/test/seq_tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py
index 5148d4b..d181e19 100644
--- a/Lib/test/seq_tests.py
+++ b/Lib/test/seq_tests.py
@@ -199,9 +199,9 @@ class CommonTest(unittest.TestCase):
def test_contains(self):
u = self.type2test([0, 1, 2])
for i in u:
- self.assert_(i in u)
+ self.assertIn(i, u)
for i in min(u)-1, max(u)+1:
- self.assert_(i not in u)
+ self.assertNotIn(i, u)
self.assertRaises(TypeError, u.__contains__)
@@ -213,8 +213,8 @@ class CommonTest(unittest.TestCase):
def __eq__(self, other):
return True
__hash__ = None # Can't meet hash invariant requirements
- self.assert_(AllEq() not in self.type2test([]))
- self.assert_(AllEq() in self.type2test([1]))
+ self.assertNotIn(AllEq(), self.type2test([]))
+ self.assertIn(AllEq(), self.type2test([1]))
def test_contains_order(self):
# Sequences must test in-order. If a rich comparison has side
@@ -227,7 +227,7 @@ class CommonTest(unittest.TestCase):
raise DoNotTestEq
checkfirst = self.type2test([1, StopCompares()])
- self.assert_(1 in checkfirst)
+ self.assertIn(1, checkfirst)
checklast = self.type2test([StopCompares(), 1])
self.assertRaises(DoNotTestEq, checklast.__contains__, 1)