Example #1
0
def test_register_dtype():
    from pybind11_tests import register_dtype

    with pytest.raises(RuntimeError) as excinfo:
        register_dtype()
    if 'dtype is already registered' not in str(excinfo.value):
        raise AssertionError
Example #2
0
def test_register_dtype():
    from pybind11_tests import register_dtype

    with pytest.raises(RuntimeError) as excinfo:
        register_dtype()
    assert 'dtype is already registered' in str(excinfo.value)