|
| job1 |
|
| job2_dict |
|
| job2 |
|
| maxDiff |
|
UnitTest for the `caf.backends.Job` class
Definition at line 35 of file test_backends.py.
◆ setUp()
Create useful objects for each test and the teardown
Definition at line 40 of file test_backends.py.
42 Create useful objects for each test and the teardown
48 job1.working_dir = Path(test_dir, job1.name,
"working_dir").absolute().as_posix()
49 job1.output_dir = Path(test_dir, job1.name,
"output_dir").absolute().as_posix()
50 job1.cmd = [
"bash", test_script.name]
51 job1.input_sandbox_files = [test_script.as_posix()]
56 job_dict[
"name"] = name2
57 job_dict[
"working_dir"] = Path(test_dir, name2,
"working_dir").as_posix()
58 job_dict[
"output_dir"] = Path(test_dir, name2,
"output_dir").as_posix()
59 job_dict[
"output_patterns"] = []
60 job_dict[
"cmd"] = [
"bash", test_script.name]
62 job_dict[
"input_sandbox_files"] = [test_script.as_posix()]
63 job_dict[
"input_files"] = []
64 job_dict[
"setup_cmds"] = []
65 job_dict[
"backend_args"] = {}
66 job_dict[
"subjobs"] = [{
"id": i,
"input_files": [],
"args": [str(i)]}
for i
in range(4)]
67 self.job2_dict = job_dict
68 self.job2 = Job(name2, job_dict=job_dict)
71 test_dir.mkdir(parents=
True, exist_ok=
False)
◆ tearDown()
Removes files/directories that were created during these tests
Definition at line 202 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 174 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 103 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 87 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 125 of file test_backends.py.
The documentation for this class was generated from the following file: