コード例 #1
0
def test_required_fail():
    with pytest.raises(RuntimeError) as excinfo:
        dep.required('bleepbloop', 'nope')
    assert 'nope' in str(excinfo.value)
コード例 #2
0
def test_required_success():
    assert dep.required('sys', 'yep') is not None
コード例 #3
0
def test_required_success():
    assert dep.required('sys', 'yep') is not None
コード例 #4
0
def test_required_fail():
    with pytest.raises(RuntimeError) as excinfo:
        dep.required('bleepbloop', 'nope')
    assert 'nope' in str(excinfo.value)