diff --git a/stingray/pulse/tests/test_accelsearch.py b/stingray/pulse/tests/test_accelsearch.py index 8fd3d54ca..5c4f854c4 100644 --- a/stingray/pulse/tests/test_accelsearch.py +++ b/stingray/pulse/tests/test_accelsearch.py @@ -1,6 +1,6 @@ import numpy as np import pytest -from stingray.pulse.accelsearch import accelsearch +from stingray.pulse.accelsearch import accelsearch, _create_responses from stingray.utils import HAS_NUMBA pytestmark = pytest.mark.slow @@ -46,6 +46,16 @@ def setup_class(cls): def test_prepare(self): pass + @pytest.mark.parametrize("kind", [float, np.longdouble]) + def test_create_response_types(self, kind): + z = np.array([-1, 0, 1], dtype=kind) + zint = np.array([-1, 0, 1], dtype=int) + + rs = _create_responses(z) + rints = _create_responses(zint) + for r, rint in zip(rs, rints): + assert np.allclose(r, rint) + def test_signal(self): candidate_table = accelsearch( self.times,