예제 #1
0
 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))
예제 #2
0
 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))
예제 #3
0
 def test_repr_just_id(self):
     # repr(placeholder) shows you how the object was constructed.
     test = PlaceHolder("test id")
     self.assertEqual(
         "<testtools.testcase.PlaceHolder(%s)>" % repr(test.id()),
         repr(test))
예제 #4
0
 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())
예제 #5
0
 def test_id_comes_from_constructor(self):
     # The id() of a PlaceHolder is whatever you pass into the constructor.
     test = PlaceHolder("test id")
     self.assertEqual("test id", test.id())
예제 #6
0
 def test_repr_custom_outcome(self):
     test = PlaceHolder("test id", outcome='addSkip')
     self.assertEqual(
         "<testtools.testcase.PlaceHolder('addSkip', %r, {})>" % (
         test.id()), repr(test))
예제 #7
0
 def test_repr_just_id(self):
     # repr(placeholder) shows you how the object was constructed.
     test = PlaceHolder("test id")
     self.assertEqual(
         "<testtools.testcase.PlaceHolder(%s)>" % repr(test.id()),
         repr(test))
예제 #8
0
 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())
예제 #9
0
 def test_id_comes_from_constructor(self):
     # The id() of a PlaceHolder is whatever you pass into the constructor.
     test = PlaceHolder("test id")
     self.assertEqual("test id", test.id())
예제 #10
0
 def test_repr_custom_outcome(self):
     test = PlaceHolder("test id", outcome='addSkip')
     self.assertEqual(
         "<testtools.testcase.PlaceHolder('addSkip', %r, {})>" % (
         test.id()), repr(test))