class Integer(MatcherTestCase): test_none = lambda self: self.assert_no_match(None) test_object = lambda self: self.assert_no_match(object()) test_iterable = lambda self: self.assert_no_match([]) test_integer = lambda self: self.assert_match(0) @skipIf(IS_PY3, "requires Python 2.x") def test_long(self): self.assert_no_match(eval('0l')) test_fraction = lambda self: self.assert_no_match(Fraction(9, 11)) test_float = lambda self: self.assert_no_match(0.0) test_complex = lambda self: self.assert_no_match(complex(0, 1)) test_repr = lambda self: self.assert_repr(__unit__.Integer()) # Assertion functions def assert_match(self, value): return super(Integer, self).assert_match(__unit__.Integer(), value) def assert_no_match(self, value): return super(Integer, self).assert_no_match(__unit__.Integer(), value)
def assert_no_match(self, value): return super(Integer, self).assert_no_match(__unit__.Integer(), value)