Skip to content

Commit

Permalink
Increase test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Feb 8, 2024
1 parent 04fca6e commit 4f135b6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,24 @@ def test_statepoint_mapping_read_only(self):
with pytest.raises(TypeError):
job.statepoint_mapping["c"] = 2

def test_statepoint_mapping_lazy_init(self):
statepoint = {"a": 0}
job = self.project.open_job(statepoint=statepoint)
job.init()
id_ = job.id

# Clear the cache to force a lazy load of the statepoint mapping
self.project._sp_cache.clear()
job = self.project.open_job(id=id_)
job.statepoint_mapping

def test_no_args_error(self):
with pytest.raises(ValueError):
self.project.open_job()

with pytest.raises(ValueError):
Job(project=self.project)


class TestConfig(TestJobBase):
def test_config_str(self):
Expand Down

0 comments on commit 4f135b6

Please sign in to comment.