summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.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_scope.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_scope.py')
-rw-r--r--Lib/test/test_scope.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index ef56b88..ffe68c8 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -447,7 +447,7 @@ self.assertTrue(X.passed)
return g
d = f(2)(4)
- self.assertTrue('h' in d)
+ self.assertIn('h', d)
del d['h']
self.assertEqual(d, {'x': 2, 'y': 7, 'w': 6})
@@ -481,8 +481,8 @@ self.assertTrue(X.passed)
return C
varnames = f(1).z
- self.assertTrue("x" not in varnames)
- self.assertTrue("y" in varnames)
+ self.assertNotIn("x", varnames)
+ self.assertIn("y", varnames)
def testLocalsClass_WithTrace(self):
# Issue23728: after the trace function returns, the locals()
@@ -660,7 +660,7 @@ result2 = h()
c = f(0)
self.assertEqual(c.get(), 1)
- self.assertTrue("x" not in c.__class__.__dict__)
+ self.assertNotIn("x", c.__class__.__dict__)
def testNonLocalGenerator(self):