Back to index

python3.2  3.2.2
Public Member Functions
test.test_pydoc.TestDescriptions Class Reference

List of all members.

Public Member Functions

def test_module
def test_class
def test_builtin

Detailed Description

Definition at line 406 of file test_pydoc.py.


Member Function Documentation

Definition at line 423 of file test_pydoc.py.

00423 
00424     def test_builtin(self):
00425         for name in ('str', 'str.translate', 'builtins.str',
00426                      'builtins.str.translate'):
00427             # test low-level function
00428             self.assertIsNotNone(pydoc.locate(name))
00429             # test high-level function
00430             try:
00431                 pydoc.render_doc(name)
00432             except ImportError:
00433                 self.fail('finding the doc of {!r} failed'.format(o))
00434 
00435         for name in ('notbuiltins', 'strrr', 'strr.translate',
00436                      'str.trrrranslate', 'builtins.strrr',
00437                      'builtins.str.trrranslate'):
00438             self.assertIsNone(pydoc.locate(name))
00439             self.assertRaises(ImportError, pydoc.render_doc, name)
00440 
00441 
@unittest.skipUnless(threading, 'Threading required for this test.')

Here is the call graph for this function:

Definition at line 414 of file test_pydoc.py.

00414 
00415     def test_class(self):
00416         class C: "New-style class"
00417         c = C()
00418 
00419         self.assertEqual(pydoc.describe(C), 'class C')
00420         self.assertEqual(pydoc.describe(c), 'C')
00421         expected = 'C in module %s object' % __name__
00422         self.assertIn(expected, pydoc.render_doc(c))

Here is the call graph for this function:

Definition at line 408 of file test_pydoc.py.

00408 
00409     def test_module(self):
00410         # Check that pydocfodder module can be described
00411         from test import pydocfodder
00412         doc = pydoc.render_doc(pydocfodder)
00413         self.assertIn("pydocfodder", doc)

Here is the call graph for this function:


The documentation for this class was generated from the following file: