Пример #1
0
def test_engines_not_installed() -> None:
    with pytest.raises(ValueError, match=r"xarray is unable to open"):
        plugins.guess_engine("not-valid")

    with pytest.raises(ValueError,
                       match=r"found the following matches with the input"):
        plugins.guess_engine("foo.nc")
Пример #2
0
def test_no_matching_engine_found() -> None:
    with pytest.raises(ValueError, match=r"did not find a match in any"):
        plugins.guess_engine("not-valid")

    with pytest.raises(ValueError,
                       match=r"found the following matches with the input"):
        plugins.guess_engine("foo.nc")
Пример #3
0
def test_no_engines_installed():
    with pytest.raises(ValueError,
                       match="no currently installed IO backends."):
        plugins.guess_engine("not-valid")
Пример #4
0
def test_no_matching_engine_found():
    with pytest.raises(
            ValueError,
            match="match in any of xarray's currently installed IO"):
        plugins.guess_engine("not-valid")