Skip to content

Commit 7ad99be

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9e2c4c2 commit 7ad99be

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests/unit/test_color_utility.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -315,25 +315,24 @@ def test_get_color_palette_source_remote_exists(self, palette_from_remote_mock):
315315
@patch('hybig.color_utility.get_remote_palette_from_source')
316316
def test_get_color_palette_with_ndv(self, get_remote_palette_from_source_mock):
317317
"""Test get_color_palette with dataset that has nodata values."""
318-
get_remote_palette_from_source_mock.side_effect = HyBIGNoColorInformation('No color in source')
319-
318+
get_remote_palette_from_source_mock.side_effect = HyBIGNoColorInformation(
319+
'No color in source'
320+
)
321+
320322
ds = Mock(DatasetReader)
321-
test_colormap = {
322-
100: (255, 0, 0, 255),
323-
200: (0, 255, 0, 255)
324-
}
323+
test_colormap = {100: (255, 0, 0, 255), 200: (0, 255, 0, 255)}
325324
ds.colormap.return_value = test_colormap.copy()
326-
325+
327326
# Mock the get_nodatavals function to return a tuple with a nodata value
328327
# that matches one of our colormap keys
329328
ds.get_nodatavals.return_value = (100,)
330-
329+
331330
actual_palette = get_color_palette(ds, None, None)
332-
331+
333332
get_remote_palette_from_source_mock.assert_called_once()
334333
ds.colormap.assert_called_once_with(1)
335334
ds.get_nodatavals.assert_called_once()
336-
335+
337336
# Compare the actual and expected palettes
338337
self.assertEqual(actual_palette.get_color(200), encode_color(0, 255, 0, 255))
339338
self.assertEqual(actual_palette.get_color('nv'), encode_color(255, 0, 0, 255))

0 commit comments

Comments
 (0)