Exemple #1
0
 def test_Seq(self, detail):
     p = Seq(Float)
     with pytest.raises(ValueError) as e:
         p.validate("junk", detail)
     assert str(e).endswith("ValueError") == (not detail)
Exemple #2
0
 def test_Seq(self):
     p = Seq(Float)
     with pytest.raises(ValueError) as e:
         p.validate("junk")
     assert not str(e).endswith("ValueError")
 def test_Seq(self, detail) -> None:
     p = Seq(Float)
     with pytest.raises(ValueError) as e:
         p.validate("junk", detail)
     assert (str(e.value) == "") == (not detail)
 def test_Seq(self) -> None:
     p = Seq(Float)
     with pytest.raises(ValueError) as e:
         p.validate("junk")
     assert matches(str(e.value), r"expected an element of Seq\(Float\), got 'junk'")
Exemple #5
0
 def test_Seq(self, detail):
     p = Seq(Float)
     with pytest.raises(ValueError) as e:
         p.validate("junk", detail)
     assert str(e).endswith("ValueError") == (not detail)
Exemple #6
0
 def test_Seq(self):
     p = Seq(Float)
     with pytest.raises(ValueError) as e:
         p.validate("junk")
     assert not str(e).endswith("ValueError")