def test_Complex(self) -> None: p = Complex() with pytest.raises(ValueError) as e: p.validate("junk") assert matches( str(e.value), r"expected a value of type Complex, got junk of type str")
def test_Complex(self, detail): p = Complex() with pytest.raises(ValueError) as e: p.validate("junk", detail) assert str(e).endswith("ValueError") == (not detail)
def test_Complex(self): p = Complex() with pytest.raises(ValueError) as e: p.validate("junk") assert not str(e).endswith("ValueError")
def test_Complex(self, detail) -> None: p = Complex() with pytest.raises(ValueError) as e: p.validate("junk", detail) assert (str(e.value) == "") == (not detail)
def test_Complex(self, detail): p = Complex() with pytest.raises(ValueError) as e: p.validate("junk", detail) assert str(e).endswith("ValueError") == (not detail)
def test_Complex(self): p = Complex() with pytest.raises(ValueError) as e: p.validate("junk") assert not str(e).endswith("ValueError")