Skip to content

Commit

Permalink
Validate the Dask FFT interface exists
Browse files Browse the repository at this point in the history
In some cases it appears Dask is installed, it is new enough, and has
support for the FFT wrapper. However there is no guarantee that a new
version of Dask will work on older Pythons. For instance, Python 3.3, is
no longer tested upstream and has not been for a while. Also Python 3.4
only sees some testing on `master` not PRs. Not to mention the
dependencies pulled in may or may not work with Dask on these older
Python versions. As a result it appears the Dask FFT interface may be
missing. So instead of testing proxies to see if Dask is installed and
functional, simply verify the Dask FFT interface for pyFFTW exists. If
not, skip all related tests.
  • Loading branch information
jakirkham committed Mar 12, 2018
1 parent 1b07d6d commit da976c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_pyfftw_dask_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def _dask_array_fft_has_norm_kwarg():
acquired_names = ('fft_wrap',)

@unittest.skipIf(
da_fft is None, "dask is not installed, so this feature is unavailable."
not hasattr(interfaces, "dask_fft"),
"dask interface is not available, so skipping tests."
)
class InterfacesDaskFFTTestModule(unittest.TestCase):
''' A really simple test suite to check the module works as expected.
Expand All @@ -98,7 +99,8 @@ def test_acquired_names(self):


@unittest.skipIf(
da_fft is None, "dask is not installed, so this feature is unavailable."
not hasattr(interfaces, "dask_fft"),
"dask interface is not available, so skipping tests."
)
class InterfacesDaskFFTTestFFT(unittest.TestCase):

Expand Down

0 comments on commit da976c7

Please sign in to comment.