Skip to content

Commit

Permalink
Improving test coverage of colorsynth.rgb().
Browse files Browse the repository at this point in the history
  • Loading branch information
byrdie committed Nov 20, 2023
1 parent c7bb44e commit 8983880
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions colorsynth/_tests/test_colorsynth.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Callable
import pytest
import numpy as np
import astropy.units as u
Expand Down Expand Up @@ -192,14 +193,20 @@ def test_colorbar(
np.linspace(380, 780, num=101) * u.nm,
],
)
@pytest.mark.parametrize(
argnames="spd_norm",
argvalues=[None, np.sqrt],
)
def test_rgb_and_colorbar(
spd: np.ndarray,
wavelength: u.Quantity,
spd_norm: None | Callable,
):
axis = -1
result = colorsynth.rgb_and_colorbar(
spd=spd,
wavelength=wavelength,
axis=axis,
spd_norm=spd_norm,
)
assert isinstance(result, tuple)

0 comments on commit 8983880

Please sign in to comment.