Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen committed Jan 14, 2024
1 parent 57ca812 commit a4d0b0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/raspa_ase/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def load_profile(self, cfg, **kwargs) -> RaspaProfile:
RaspaProfile
The RASPA profile.
"""
return RaspaProfile.from_config(cfg, self.name, **kwargs)
raise NotImplementedError


class Raspa(GenericFileIOCalculator):
Expand Down
6 changes: 6 additions & 0 deletions tests/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ def test_template():
assert template.output_file == "raspa.out"


def test_notimplemented():
template = RaspaTemplate()
with pytest.raises(NotImplementedError):
template.load_profile(None)


def test_template_execute(monkeypatch, tmp_path):
monkeypatch.chdir(tmp_path)
with Path(tmp_path / "simulation.input").open(mode="w") as fd:
Expand Down

0 comments on commit a4d0b0f

Please sign in to comment.