Skip to content

Commit

Permalink
FIX: Fix conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Sep 1, 2017
1 parent f03260c commit 163d21d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ matrix:
# No data + style testing
- env: DEPS=nodata MNE_DONTWRITE_HOME=true MNE_FORCE_SERIAL=true MNE_SKIP_NETWORK_TEST=1
OPTION="--doctest-ignore-import-errors"
CONDA_DEPENDENCIES="numpy scipy matplotlib sphinx pytest"
CONDA_DEPENDENCIES="numpy scipy matplotlib sphinx pytest nose"
PIP_DEPENDENCIES="flake8 numpydoc codespell git+git://github.com/PyCQA/pydocstyle.git codecov check-manifest pytest-sugar pytest-cov"

# 3.6 + non-default stim channel
Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dependencies:
- h5py
- sphinx
- vtk
- nose
- pytest
- pip:
- mne
- mayavi
Expand All @@ -28,11 +30,9 @@ dependencies:
- nilearn
- neo
- pillow
- nose
- pytest
- pytest-cov
- pytest-sugar
- sphinx_bootstrap_theme
- numpydoc
- sphinx-gallery
- traitsui
- "git+https://github.com/enthought/traitsui.git"
4 changes: 0 additions & 4 deletions mne/gui/tests/test_kit2fiff_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ def test_kit2fiff_model():
@requires_mayavi
def test_kit2fiff_gui():
"""Test Kit2Fiff GUI."""
if os.environ.get('TRAVIS_OS_NAME') == 'linux':
raise SkipTest("Skipping on Travis for Linux due to GUI error")
if os.environ.get('APPVEYOR') == 'True':
raise SkipTest("Skipping on AppVeyor due to GUI error")
home_dir = _TempDir()
os.environ['_MNE_GUI_TESTING_MODE'] = 'true'
os.environ['_MNE_FAKE_HOME_DIR'] = home_dir
Expand Down
3 changes: 1 addition & 2 deletions mne/io/meas_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def _summarize_str(st):
def _stamp_to_dt(stamp):
"""Convert timestamp to datetime object in Windows-friendly way."""
# The min on windows is 86400
stamp = np.array(stamp, int) # usually comes as int32
assert stamp.shape == (2,)
stamp = [int(s) for s in stamp]
return (datetime.datetime.utcfromtimestamp(stamp[0]) +
datetime.timedelta(0, 0, stamp[1])) # day, sec, μs

Expand Down
6 changes: 4 additions & 2 deletions mne/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,10 @@ def dec(*args, **kwargs): # noqa: D102
try:
exec(call) in globals(), locals()
except Exception as exc:
raise SkipTest('Test %s skipped, requires %s. Got exception (%s)'
% (function.__name__, name, exc))
msg = 'Test %s skipped, requires %s.' % (function.__name__, name)
if len(str(exc)) > 0:
msg += ' Got exception (%s)' % (exc,)
raise SkipTest(msg)
return function(*args, **kwargs)
return dec

Expand Down

0 comments on commit 163d21d

Please sign in to comment.