mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
use assert[Not]In where appropriate
A patch from Dave Malcolm.
This commit is contained in:
parent
a69ba65fdc
commit
577473fe68
75 changed files with 471 additions and 454 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue