-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes wrapper warning message at the end * Added typing suggestion
- Loading branch information
1 parent
7b3e226
commit 451a25c
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import time | ||
import pytest | ||
|
||
from autosubmit.job.job import Job | ||
from autosubmit.job.job_common import Status | ||
from autosubmit.job.job_packages import JobPackageVertical | ||
from autosubmit.job.job_packager import JobPackager | ||
|
||
|
||
@pytest.fixture | ||
def setup(autosubmit_config, tmpdir, mocker): | ||
job1 = Job("SECTION1", 1, Status.READY, 0) | ||
job2 = Job("SECTION1", 1, Status.READY, 0) | ||
job3 = Job("SECTION1", 1, Status.READY, 0) | ||
wrapper_jobs = [job1, job2, job3] | ||
packages = [mocker.MagicMock(spec=JobPackageVertical)] | ||
packages[0].jobs = wrapper_jobs | ||
yield packages, wrapper_jobs | ||
|
||
|
||
def test_propagate_inner_jobs_ready_date(setup): | ||
packages, wrapper_jobs = setup | ||
current_time = time.time() | ||
wrapper_jobs[0].ready_date = current_time | ||
JobPackager._propagate_inner_jobs_ready_date(packages) | ||
for job in wrapper_jobs: | ||
assert job.ready_date == current_time |