def test_repr_with_description(self): # repr(placeholder) shows you how the object was constructed. test = PlaceHolder("test id", "description") self.assertEqual( "<testtools.testcase.PlaceHolder(%r, %r)>" % ( test.id(), test.shortDescription()), repr(test))
def test_shortDescription_specified(self): # If a shortDescription is provided to the constructor, then # shortDescription() returns that instead. test = PlaceHolder("test id", "description") self.assertEqual("description", test.shortDescription())
def test_shortDescription_is_id(self): # The shortDescription() of a PlaceHolder is the id, by default. test = PlaceHolder("test id") self.assertEqual(test.id(), test.shortDescription())