Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aperrin66 committed Jul 25, 2024
1 parent 1c8920f commit aa712d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/converters/test_syntool_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ def test_ingest_subprocess_error(self):
"""Test error handling when the sub process encounters an error"""
converter = syntool_converter.SyntoolConverter()
with mock.patch('subprocess.run', side_effect=subprocess.CalledProcessError(1, '')):
with self.assertLogs(syntool_converter.logger, level=logging.INFO), \
self.assertRaises(converters_base.ConversionError):
with self.assertLogs(syntool_converter.logger, level=logging.WARNING):
converter.ingest('/bar/foo.tiff', '/bar', ['--baz'])

def test_ingest_move_results_error(self):
Expand All @@ -81,8 +80,7 @@ def test_ingest_move_results_error(self):
converter = syntool_converter.SyntoolConverter()
with mock.patch('subprocess.run'), \
mock.patch.object(converter, 'move_results', return_value=[]):
with self.assertLogs(syntool_converter.logger, level=logging.INFO), \
self.assertRaises(converters_base.ConversionError):
with self.assertLogs(syntool_converter.logger, level=logging.WARNING):
converter.ingest('/bar/foo.tiff', '/bar', ['--baz'])

def test_post_ingest(self):
Expand Down

0 comments on commit aa712d1

Please sign in to comment.