summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bigmem.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-19 00:09:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-19 00:09:57 (GMT)
commit577473fe687b38c8f01b0c372d6d2563680045b3 (patch)
treeee7dc210c7c5281cf07add09a9cb451758e91716 /Lib/test/test_bigmem.py
parenta69ba65fdce3be6f55634b47cc56cf1f962f6cbc (diff)
downloadcpython-577473fe687b38c8f01b0c372d6d2563680045b3.zip
cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.gz
cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.bz2
use assert[Not]In where appropriate
A patch from Dave Malcolm.
Diffstat (limited to 'Lib/test/test_bigmem.py')
-rw-r--r--Lib/test/test_bigmem.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_bigmem.py b/Lib/test/test_bigmem.py
index 030ada5..843abb9 100644
--- a/Lib/test/test_bigmem.py
+++ b/Lib/test/test_bigmem.py
@@ -519,12 +519,12 @@ class BaseStrTest:
edge = _('-') * (size // 2)
s = _('').join([edge, SUBSTR, edge])
del edge
- self.assertTrue(SUBSTR in s)
+ self.assertIn(SUBSTR, s)
self.assertFalse(SUBSTR * 2 in s)
- self.assertTrue(_('-') in s)
+ self.assertIn(_('-'), s)
self.assertFalse(_('a') in s)
s += _('a')
- self.assertTrue(_('a') in s)
+ self.assertIn(_('a'), s)
@bigmemtest(minsize=_2G + 10, memuse=2)
def test_compare(self, size):
@@ -768,7 +768,7 @@ class TupleTest(unittest.TestCase):
def test_contains(self, size):
t = (1, 2, 3, 4, 5) * size
self.assertEquals(len(t), size * 5)
- self.assertTrue(5 in t)
+ self.assertIn(5, t)
self.assertFalse((1, 2, 3, 4, 5) in t)
self.assertFalse(0 in t)
@@ -917,7 +917,7 @@ class ListTest(unittest.TestCase):
def test_contains(self, size):
l = [1, 2, 3, 4, 5] * size
self.assertEquals(len(l), size * 5)
- self.assertTrue(5 in l)
+ self.assertIn(5, l)
self.assertFalse([1, 2, 3, 4, 5] in l)
self.assertFalse(0 in l)