Пример #1
0
def test_call(fun, args, expected):
    with using_engine(engine):
        if isinstance(expected, type) and issubclass(expected, Exception):
            with pytest.raises(expected):
                fun(*args)
        else:
            actual = fun(*args)
            assert actual == expected
Пример #2
0
def test_py_all_different(expected, xs):
    with using_engine(bohm):
        actual = sudoku.py_all_different(xs)
    assert actual == expected