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