예제 #1
0
 def test_when_not_type(self):
     obj = Type1()
     w = when(obj)
     with ShouldRaise(AttributeError(
             "'Type1' object has no attribute '__name__'"
             )):
         repr(w)
예제 #2
0
 def test_when_default(self):
     w = when()
     self.assertTrue(w.type is type(None))