Skip to content

Commit

Permalink
Add more tests for job.files.list()
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 12, 2024
1 parent 440459c commit 75b2a6a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/job/test_genericJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,15 @@ def test_restart(self):
wd_files = os.listdir(job_restart.working_directory)
self.assertEqual(len(wd_files), 1, "Only one zipped file should be present in the working directory")
self.assertEqual(wd_files[0], f"{job_restart.name}.tar.bz2", "Inconsistent name for the zipped file")
wd_files = job_restart.files.list()
self.assertEqual(
len(wd_files),
1,
"Only one input file should be present in the working directory",
)
self.assertCountEqual(
wd_files, ["input.yml"]
)
job_restart.decompress()
wd_files = job_restart.list_files()
self.assertEqual(
Expand All @@ -473,6 +482,15 @@ def test_restart(self):
self.assertCountEqual(
wd_files, ["input.yml"]
)
wd_files = job_restart.files.list()
self.assertEqual(
len(wd_files),
1,
"Only one input file should be present in the working directory",
)
self.assertCountEqual(
wd_files, ["input.yml"]
)
finally:
self.project.state.settings.configuration[
wd_warn_key
Expand Down

0 comments on commit 75b2a6a

Please sign in to comment.