Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aperrin66 committed Dec 10, 2024
1 parent 3bf023a commit c90f029
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/converters/test_syntool_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,12 @@ def test_run_conversion_system_exit(self):
"""Test that SystemExit exceptions do not interrupt the
conversion process but simply return empty results
"""
error = syntool_converter.ConversionError()
error.__cause__ = SystemExit()
converter = syntool_converter.Sentinel3OLCISyntoolConverter(
converter_type='foo',
ingest_parameter_files='bar')
with mock.patch.object(converter, 'convert', side_effect=[SystemExit, ['conv2.tiff']]):
with mock.patch.object(converter, 'convert', side_effect=[error, ['conv2.tiff']]):
with self.assertLogs(level=logging.WARNING):
results = converter.run_conversion(
'in.nc', 'out', {'converter_options': {'channels': ['baz', 'qux']}})
Expand Down

0 comments on commit c90f029

Please sign in to comment.