def test_Angle(self):
     p = Angle()
     with pytest.raises(ValueError) as e:
         p.validate("junk")
     assert matches(
         str(e.value),
         r"expected a value of type Real, got junk of type (str|unicode)")
예제 #2
0
 def test_Angle(self):
     p = Angle()
     with pytest.raises(ValueError) as e:
         p.validate("junk")
     assert not str(e).endswith("ValueError")
예제 #3
0
 def test_Angle(self, detail):
     p = Angle()
     with pytest.raises(ValueError) as e:
         p.validate("junk", detail)
     assert str(e).endswith("ValueError") == (not detail)
예제 #4
0
 def test_Angle(self, detail) -> None:
     p = Angle()
     with pytest.raises(ValueError) as e:
         p.validate("junk", detail)
     assert (str(e.value) == "") == (not detail)
예제 #5
0
 def test_Angle(self):
     p = Angle()
     with pytest.raises(ValueError) as e:
         p.validate("junk")
     assert not str(e).endswith("ValueError")
예제 #6
0
 def test_Angle(self, detail):
     p = Angle()
     with pytest.raises(ValueError) as e:
         p.validate("junk", detail)
     assert str(e).endswith("ValueError") == (not detail)