Skip to content

Commit

Permalink
add tests for soil_layers_thickness in config
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahAlidoost committed Sep 27, 2024
1 parent 3aae254 commit e9268ce
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_config_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ def test_create_io_dir(self):
assert Path(input_dir).is_dir()
assert Path(output_dir).is_dir()
assert Path(config_path).exists()

def test_without_soil_layers_thickness(self, dummy_config):
dummy_config["soil_layers_thickness"] = ""
with pytest.raises(FileNotFoundError):
config_io.create_io_dir(dummy_config)

def test_with_soil_layers_thickness(self, dummy_config):
dummy_config["soil_layers_thickness"] = dummy_config["input_data"]
input_dir, _, _ = config_io.create_io_dir(dummy_config)

assert (Path(input_dir) / "dummy_data.xlsx").exists()

0 comments on commit e9268ce

Please sign in to comment.