Skip to content

Commit

Permalink
test mock property fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ankona committed Oct 21, 2024
1 parent ae2446e commit d93e15c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def mock_job() -> unittest.mock.MagicMock:
job = unittest.mock.MagicMock(
**{
"entity": EchoHelloWorldEntity(),
"name": "test_job",
"name": unittest.mock.PropertyMock(return_value="test_job"),
"get_launch_steps": unittest.mock.MagicMock(
side_effect=lambda: NotImplementedError()
),
Expand Down Expand Up @@ -344,8 +344,8 @@ def test_exp_private_generate_method(
exp = Experiment(name="experiment_name", exp_path=test_dir)
job_paths = exp._generate(generator_instance, mock_job, mock_index)
assert osp.isdir(job_paths.run_path)
assert job_paths.out_path.name == f"{mock_job.entity.name}.out"
assert job_paths.err_path.name == f"{mock_job.entity.name}.err"
assert job_paths.out_path.name == mock_job.entity.name + ".out"
assert job_paths.err_path.name == mock_job.entity.name + ".err"


def test_generate_ensemble_directory_start(
Expand Down

0 comments on commit d93e15c

Please sign in to comment.