MRG: Fix Travis (#5363)

* FIX: Fix Travis

* FIX: Flake
This commit is contained in:
Eric Larson
2018-07-24 23:24:45 -04:00
committed by GitHub
parent 8bccec4977
commit d109dd8d43
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -1,4 +1,5 @@
import numpy as np
import pytest
from pytest import raises
from numpy.testing import assert_array_equal, assert_allclose
from os import path as op
@@ -533,13 +534,12 @@ def test_csd_morlet():
assert_allclose(csd._data[[0, 3, 5]] * sfreq, power)
# Test baselining warning
with warnings.catch_warnings(record=True) as w:
with pytest.warns(RuntimeWarning, match='baseline'):
warnings.simplefilter('always')
epochs_nobase = epochs.copy()
epochs_nobase.baseline = None
epochs_nobase.info['highpass'] = 0
csd = csd_morlet(epochs_nobase, frequencies=[10], decim=20)
assert len(w) == 1
run_tests_if_main()
+1 -3
View File
@@ -1,6 +1,5 @@
import numpy as np
import os.path as op
import warnings
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_equal)
@@ -240,9 +239,8 @@ def test_time_frequency():
# When convolving in time, wavelets must not be longer than the data
pytest.raises(ValueError, cwt, data[0, :, :Ws[0].size - 1], Ws,
use_fft=False)
with warnings.catch_warnings(record=True) as w:
with pytest.warns(UserWarning, match='one of the wavelets is longer'):
cwt(data[0, :, :Ws[0].size - 1], Ws, use_fft=True)
assert_equal(len(w), 1)
# Check for off-by-one errors when using wavelets with an even number of
# samples
+1
View File
@@ -23,6 +23,7 @@ filterwarnings =
ignore:module pycuda not found
ignore:.*HasTraits.trait_.*:DeprecationWarning
ignore:joblib not installed:RuntimeWarning
ignore:Using a non-tuple sequence for multidimensional indexing:FutureWarning
[flake8]
exclude = __init__.py,*externals*,constants.py,fixes.py