def test_experiment_group_outputs_path_creation_deletion(self):
     job = BuildJobFactory()
     create_job_outputs_path(job.unique_name)
     job_outputs_path = get_job_outputs_path(job.unique_name)
     assert os.path.exists(job_outputs_path) is True
     delete_job_outputs(job.unique_name)
     assert os.path.exists(job_outputs_path) is False
Example #2
0
 def test_job_outputs_path_creation_deletion(self):
     job = JobFactory()
     create_job_outputs_path(persistence_outputs=job.persistence_outputs,
                             job_name=job.unique_name)
     job_outputs_path = get_job_outputs_path(
         persistence_outputs=job.persistence_outputs,
         job_name=job.unique_name)
     assert os.path.exists(job_outputs_path) is True
     delete_job_outputs(persistence_outputs=job.persistence_outputs,
                        job_name=job.unique_name)
     assert os.path.exists(job_outputs_path) is False
Example #3
0
    def setUp(self):
        super().setUp()
        project = ProjectFactory(user=self.auth_client.user)
        job = JobFactory(project=project)
        self.url = '/{}/{}/{}/jobs/{}/outputs/files'.format(
            API_V1, project.user.username, project.name, job.id)

        outputs_path = get_job_outputs_path(
            persistence_outputs=job.persistence_outputs,
            job_name=job.unique_name)
        create_job_outputs_path(persistence_outputs=job.persistence_outputs,
                                job_name=job.unique_name)
        self.create_paths(path=outputs_path, url=self.url)
Example #4
0
 def create_tmp_outputs(self):
     create_job_outputs_path(
         persistence_outputs=self.job.persistence_outputs,
         job_name=self.job.unique_name)
     for i in range(4):
         open('{}/{}'.format(self.job_outputs_path, i), '+w')