def test_integer_fail(self): with raises(AssertionError) as exc: types.integer('a string') assert exc.value.args[0] == 'not of type int'
def test_integer_pass(self): assert types.integer(1) is None