Esempio n. 1
0
 def test_grass_is_non_resolvable_raises(self):
     with pytest.raises(ValueError) as exc:
         resolve_grass_executable()
     assert "GST_GRASS_EXECUTABLE" in str(exc)
Esempio n. 2
0
 def test_gst_env_is_set_as_an_executable_OK(self):
     path = "/bin/ls"
     grass = resolve_grass_executable(path)
     assert grass == pathlib.Path(path)
Esempio n. 3
0
 def test_path_is_specified_as_an_executable_OK(self, path):
     grass = resolve_grass_executable(path)
     assert grass == pathlib.Path(path)
Esempio n. 4
0
 def test_gst_env_is_set_but_not_an_executable_raises(self, path):
     os.environ["GST_GRASS_EXECUTABLE"] = path
     with pytest.raises(ValueError) as exc:
         resolve_grass_executable()
     assert f"not: {path}" in str(exc)
     assert "GST_GRASS_EXECUTABLE" in str(exc)
Esempio n. 5
0
 def test_path_is_specified_but_not_an_executable_raises(self, path):
     with pytest.raises(ValueError) as exc:
         resolve_grass_executable(path)
     assert f"not: {path}" in str(exc)