Exemplo n.º 1
0
 def test_assert_in_with_deferrables(self):
     self.assertTrue(sn.assert_in(1, make_deferrable([1, 2, 3])))
     self.assertRaisesRegex(SanityError, '0 is not in \[1, 2, 3\]',
                            evaluate,
                            sn.assert_in(0, make_deferrable([1, 2, 3])))
Exemplo n.º 2
0
def test_assert_in_with_deferrables():
    assert sn.assert_in(1, sn.defer([1, 2, 3]))
    with pytest.raises(SanityError, match=r'0 is not in \[1, 2, 3\]'):
        sn.evaluate(sn.assert_in(0, sn.defer([1, 2, 3])))
Exemplo n.º 3
0
 def test_assert_in(self):
     self.assertTrue(sn.assert_in(1, [1, 2, 3]))
     self.assertRaisesRegex(SanityError, '0 is not in \[1, 2, 3\]',
                            evaluate, sn.assert_in(0, [1, 2, 3]))
Exemplo n.º 4
0
def test_assert_in():
    assert sn.assert_in(1, [1, 2, 3])
    with pytest.raises(SanityError, match=r'0 is not in \[1, 2, 3\]'):
        sn.evaluate(sn.assert_in(0, [1, 2, 3]))