use assert[Not]In where appropriate

A patch from Dave Malcolm.
This commit is contained in:
Benjamin Peterson 2010-01-19 00:09:57 +00:00
parent a69ba65fdc
commit 577473fe68
75 changed files with 471 additions and 454 deletions

View file

@ -313,7 +313,7 @@ class TestDescriptions(unittest.TestCase):
# Check that pydocfodder module can be described
from test import pydocfodder
doc = pydoc.render_doc(pydocfodder)
self.assertTrue("pydocfodder" in doc)
self.assertIn("pydocfodder", doc)
def test_classic_class(self):
class C: "Classic class"
@ -321,7 +321,7 @@ class TestDescriptions(unittest.TestCase):
self.assertEqual(pydoc.describe(C), 'class C')
self.assertEqual(pydoc.describe(c), 'C')
expected = 'C in module %s' % __name__
self.assertTrue(expected in pydoc.render_doc(c))
self.assertIn(expected, pydoc.render_doc(c))
def test_class(self):
class C(object): "New-style class"
@ -330,7 +330,7 @@ class TestDescriptions(unittest.TestCase):
self.assertEqual(pydoc.describe(C), 'class C')
self.assertEqual(pydoc.describe(c), 'C')
expected = 'C in module %s object' % __name__
self.assertTrue(expected in pydoc.render_doc(c))
self.assertIn(expected, pydoc.render_doc(c))
def test_main():