Commit 3540a3a2 authored by Maxime Hubert's avatar Maxime Hubert
Browse files

Bug fix: update unittests to ignore existing container outputs

parent 8fe8b9c7
Pipeline #140333 passed with stage
in 37 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))
......@@ -40,6 +45,8 @@ class TestValidateSystem(unittest.TestCase):
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