Commit e86b3c52 authored by Maxime Hubert's avatar Maxime Hubert
Browse files

Bugfix in unittests: ignore existing container outputs

parents cd78b154 3540a3a2
Pipeline #140345 passed with stage
in 30 seconds
......@@ -21,6 +21,11 @@ class TestValidateSystem(unittest.TestCase):
self.test_examples_path = os.path.join(self.test_dir_path, 'validate_system/validate_container_output')
self.system_outputs_dir = os.path.join(self.test_dir_path, '../diva_evaluation_cli/container_output')
self.old_system_outputs_dir = self.system_outputs_dir + '_tmp'
# Move existing system outputs to perform test
os.renames(self.system_outputs_dir, self.old_system_outputs_dir)
os.makedirs(self.system_outputs_dir)
valid_test_examples_dirs = os.listdir(os.path.join(self.test_examples_path, 'valid'))
self.valid_test_examples = [os.path.join(self.test_examples_path, 'valid', os.path.basename(subdir))
......@@ -39,7 +44,9 @@ class TestValidateSystem(unittest.TestCase):
link_path = os.path.join(self.system_outputs_dir, os.path.basename(test_example_dir))
if os.path.islink(link_path):
os.unlink(link_path)
# Move back previous system outputs
os.renames(self.old_system_outputs_dir, self.system_outputs_dir)
def test_valid_container_outputs(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment