Example #1
0
 def test_assert_le_with_deferrables(self):
     self.assertTrue(sn.assert_le(1, make_deferrable(3)))
     self.assertTrue(sn.assert_le(3, make_deferrable(3)))
     self.assertRaisesRegex(SanityError, '3 > 1', evaluate,
                            sn.assert_le(3, make_deferrable(1)))
Example #2
0
def test_assert_le_with_deferrables():
    assert sn.assert_le(1, sn.defer(3))
    assert sn.assert_le(3, sn.defer(3))
    with pytest.raises(SanityError, match='3 > 1'):
        sn.evaluate(sn.assert_le(3, sn.defer(1)))
Example #3
0
 def test_assert_le(self):
     self.assertTrue(sn.assert_le(1, 1))
     self.assertTrue(sn.assert_le(3, 3))
     self.assertRaisesRegex(SanityError, '3 > 1', evaluate,
                            sn.assert_le(3, 1))
Example #4
0
def test_assert_le():
    assert sn.assert_le(1, 1)
    assert sn.assert_le(3, 3)
    with pytest.raises(SanityError, match='3 > 1'):
        sn.evaluate(sn.assert_le(3, 1))