Exemple #1
0
 def test_assert_not_in_with_deferrables(self):
     self.assertTrue(sn.assert_not_in(0, make_deferrable([1, 2, 3])))
     self.assertRaisesRegex(SanityError, '1 is in \[1, 2, 3\]', evaluate,
                            sn.assert_not_in(1, make_deferrable([1, 2, 3])))
Exemple #2
0
def test_assert_not_in_with_deferrables():
    assert sn.assert_not_in(0, sn.defer([1, 2, 3]))
    with pytest.raises(SanityError, match=r'1 is in \[1, 2, 3\]'):
        sn.evaluate(sn.assert_not_in(1, sn.defer([1, 2, 3])))
Exemple #3
0
 def test_assert_not_in(self):
     self.assertTrue(sn.assert_not_in(0, [1, 2, 3]))
     self.assertRaisesRegex(SanityError, '1 is in \[1, 2, 3\]', evaluate,
                            sn.assert_not_in(1, [1, 2, 3]))
Exemple #4
0
def test_assert_not_in():
    assert sn.assert_not_in(0, [1, 2, 3])
    with pytest.raises(SanityError, match=r'1 is in \[1, 2, 3\]'):
        sn.evaluate(sn.assert_not_in(1, [1, 2, 3]))