Exemplo n.º 1
0
 def test_compare_attribute_greater(self):
     assert not Hypothesis._compare_attribute_constraints(
         None, "val1", Hypothesis.GREATER)
     assert Hypothesis._compare_attribute_constraints(
         "val1", None, Hypothesis.GREATER)
     assert Hypothesis._compare_attribute_constraints(
         None, None, Hypothesis.GREATER)
     assert Hypothesis._compare_attribute_constraints(
         All, All, Hypothesis.GREATER)
     assert Hypothesis._compare_attribute_constraints(
         "val1", "val1", Hypothesis.GREATER)
     assert not Hypothesis._compare_attribute_constraints(
         "val1", All, Hypothesis.GREATER)
     assert Hypothesis._compare_attribute_constraints(
         All, "val1", Hypothesis.GREATER)
     assert not Hypothesis._compare_attribute_constraints(
         "val1", "val2", Hypothesis.GREATER)
Exemplo n.º 2
0
 def test_compare_attribute_constraints_less(self):
     assert Hypothesis._compare_attribute_constraints(
         None, "val1", Hypothesis.LESS)
     assert not Hypothesis._compare_attribute_constraints(
         "val1", None, Hypothesis.LESS)
     assert Hypothesis._compare_attribute_constraints(
         None, None, Hypothesis.LESS)
     assert Hypothesis._compare_attribute_constraints(
         All, All, Hypothesis.LESS)
     assert Hypothesis._compare_attribute_constraints(
         "val1", "val1", Hypothesis.LESS)
     assert Hypothesis._compare_attribute_constraints(
         "val1", All, Hypothesis.LESS)
     assert not Hypothesis._compare_attribute_constraints(
         All, "val1", Hypothesis.LESS)
     assert not Hypothesis._compare_attribute_constraints(
         "val1", "val2", Hypothesis.LESS)