Skip to content

Commit

Permalink
removed all leaking temp files in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
denisri committed Oct 3, 2023
1 parent 3d9f8d7 commit 02acd7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions capsul/pipeline/test/test_pipeline_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def setUp(self):
self.pipeline = self.capsul.executable(DummyPipeline)
self.tmpdir = tempfile.mkdtemp()
self.pipeline.input = osp.join(self.tmpdir, 'file_in.nii')
self.pipeline.output1 = osp.join(self.tmpdir, '/tmp/file_out1.nii')
self.pipeline.output2 = osp.join(self.tmpdir, '/tmp/file_out2.nii')
self.pipeline.output3 = osp.join(self.tmpdir, '/tmp/file_out3.nii')
self.pipeline.output1 = osp.join(self.tmpdir, 'file_out1.nii')
self.pipeline.output2 = osp.join(self.tmpdir, 'file_out2.nii')
self.pipeline.output3 = osp.join(self.tmpdir, 'file_out3.nii')

def tearDown(self):
try:
Expand Down
1 change: 1 addition & 0 deletions capsul/pipeline/test/test_process_iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def setUp(self):
self.output_file = NamedTemporaryFile()
self.output_file.close()
self.pipeline.output_image = self.output_file.name
self.temp_files = [self.input_file.name, self.output_file.name]

def tearDown(self):
if hasattr(self, 'temp_files'):
Expand Down

0 comments on commit 02acd7c

Please sign in to comment.