Ejemplo n.º 1
0
 def testGetDescriptionWithOneLineDocstring(self):
     """Tests getDescription() for a method with a docstring."""
     result = unittest.TextTestResult(None, True, 1)
     self.assertEqual(
             result.getDescription(self),
            ('testGetDescriptionWithOneLineDocstring '
             '(' + __name__ + '.Test_TestResult)\n'
             'Tests getDescription() for a method with a docstring.'))
Ejemplo n.º 2
0
 def testGetDescriptionWithMultiLineDocstring(self):
     """Tests getDescription() for a method with a longer docstring.
     The second line of the docstring.
     """
     result = unittest.TextTestResult(None, True, 1)
     self.assertEqual(result.getDescription(self),
                      ('testGetDescriptionWithMultiLineDocstring '
                       '(' + __name__ + '.Test_TestResult)\n'
                       'Tests getDescription() for a method with a longer '
                       'docstring.'))
Ejemplo n.º 3
0
 def testGetDescriptionWithoutDocstring(self):
     result = unittest.TextTestResult(None, True, 1)
     self.assertEqual(
             result.getDescription(self),
             'testGetDescriptionWithoutDocstring (' + __name__ +
             '.Test_TestResult)')