class Complex(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_match(eval('0l')) test_fraction = lambda self: self.assert_match(Fraction(5, 7)) test_float = lambda self: self.assert_match(0.0) test_complex = lambda self: self.assert_match(complex(0, 1)) test_repr = lambda self: self.assert_repr(__unit__.Complex()) # Assertion functions def assert_match(self, value): return super(Complex, self).assert_match(__unit__.Complex(), value) def assert_no_match(self, value): return super(Complex, self).assert_no_match(__unit__.Complex(), value)
def assert_no_match(self, value): return super(Complex, self).assert_no_match(__unit__.Complex(), value)