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