|
| job1 |
|
| job2_dict |
|
| job2 |
|
| maxDiff |
|
UnitTest for the `caf.backends.Job` class
Definition at line 27 of file test_backends.py.
◆ setUp()
Create useful objects for each test and the teardown
Definition at line 32 of file test_backends.py.
34 Create useful objects for each test and the teardown
40 job1.working_dir = Path(test_dir, job1.name,
"working_dir").absolute().as_posix()
41 job1.output_dir = Path(test_dir, job1.name,
"output_dir").absolute().as_posix()
42 job1.cmd = [
"bash", test_script.name]
43 job1.input_sandbox_files = [test_script.as_posix()]
48 job_dict[
"name"] = name2
49 job_dict[
"working_dir"] = Path(test_dir, name2,
"working_dir").as_posix()
50 job_dict[
"output_dir"] = Path(test_dir, name2,
"output_dir").as_posix()
51 job_dict[
"output_patterns"] = []
52 job_dict[
"cmd"] = [
"bash", test_script.name]
54 job_dict[
"input_sandbox_files"] = [test_script.as_posix()]
55 job_dict[
"input_files"] = []
56 job_dict[
"setup_cmds"] = []
57 job_dict[
"backend_args"] = {}
58 job_dict[
"subjobs"] = [{
"id": i,
"input_files": [],
"args": [str(i)]}
for i
in range(4)]
59 self.job2_dict = job_dict
60 self.job2 = Job(name2, job_dict=job_dict)
63 test_dir.mkdir(parents=
True, exist_ok=
False)
◆ tearDown()
Removes files/directories that were created during these tests
Definition at line 194 of file test_backends.py.
◆ test_input_sandbox_copy()
def test_input_sandbox_copy |
( |
|
self | ) |
|
Does the copy of files/directories for the input sandbox work correctly?
Definition at line 166 of file test_backends.py.
◆ test_path_object_conversion()
def test_path_object_conversion |
( |
|
self | ) |
|
Make sure that the two ways of setting up Job objects correctly converted attributes to be Paths instead of strings.
Definition at line 95 of file test_backends.py.
◆ test_status()
The Jobs haven't been run so they should be in the 'init' status.
They also shouldn't throw exceptions due to missing result objects.
Definition at line 79 of file test_backends.py.
◆ test_subjob_splitting()
def test_subjob_splitting |
( |
|
self | ) |
|
Test the creation of SubJobs and assignment of input data files via splitter classes.
Definition at line 117 of file test_backends.py.
The documentation for this class was generated from the following file: