Skip to content

Commit

Permalink
Test float cast in _norm_args (#105)
Browse files Browse the repository at this point in the history
Provide integral data to `_norm_args` to test that it does cast this to
float.
  • Loading branch information
jakirkham committed Feb 14, 2019
1 parent 1a78285 commit 21047b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_dask_image/test_ndfourier/test__utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-


import numbers

import pytest

import dask.array as da
Expand All @@ -11,6 +13,8 @@
@pytest.mark.parametrize(
"a, s, n, axis", [
(da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1),
(da.ones((3, 4), dtype='i8', chunks=(3, 4)),
da.ones((2,), dtype='i8', chunks=(2,)), -1, -1),
]
)
def test_norm_args(a, s, n, axis):
Expand All @@ -20,3 +24,6 @@ def test_norm_args(a, s, n, axis):

assert isinstance(a2, da.Array)
assert isinstance(s2, da.Array)

assert issubclass(a2.real.dtype.type, numbers.Real)
assert issubclass(s2.dtype.type, numbers.Real)

0 comments on commit 21047b4

Please sign in to comment.