Skip to content

Commit 617e216

Browse files
committed
Fix tests.
1 parent 6f451fc commit 617e216

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

neo/test/iotest/test_klustakwikio.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
import neo
1616
from neo.test.iotest.common_io_test import BaseTestIO
1717
from neo.test.tools import assert_arrays_almost_equal
18-
from neo.io.klustakwikio import KlustaKwikIO, HAVE_MLAB
18+
from neo.io.klustakwikio import KlustaKwikIO
1919

2020

21-
@unittest.skipUnless(HAVE_MLAB, "requires matplotlib")
2221
class testFilenameParser(unittest.TestCase):
2322
"""Tests that filenames can be loaded with or without basename.
2423
@@ -75,7 +74,6 @@ def test3(self):
7574
'basename2.clu.1')))
7675

7776

78-
@unittest.skipUnless(HAVE_MLAB, "requires matplotlib")
7977
class testRead(unittest.TestCase):
8078
"""Tests that data can be read from KlustaKwik files"""
8179

@@ -140,7 +138,6 @@ def test2(self):
140138
0.228])))
141139

142140

143-
@unittest.skipUnless(HAVE_MLAB, "requires matplotlib")
144141
class testWrite(unittest.TestCase):
145142
def setUp(self):
146143
self.dirname = os.path.join(tempfile.gettempdir(),
@@ -249,7 +246,6 @@ def test1(self):
249246
delete_test_session()
250247

251248

252-
@unittest.skipUnless(HAVE_MLAB, "requires matplotlib")
253249
class testWriteWithFeatures(unittest.TestCase):
254250
def setUp(self):
255251
self.dirname = os.path.join(tempfile.gettempdir(),
@@ -333,7 +329,6 @@ def test1(self):
333329
delete_test_session(self.dirname)
334330

335331

336-
@unittest.skipUnless(HAVE_MLAB, "requires matplotlib")
337332
class CommonTests(BaseTestIO, unittest.TestCase):
338333
ioclass = KlustaKwikIO
339334
entities_to_download = [

neo/test/iotest/test_kwikio.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
import unittest
66

77
try:
8-
import h5py
9-
10-
HAVE_H5PY = True
8+
from klusta import kwik
9+
HAVE_KWIK = True
1110
except ImportError:
12-
HAVE_H5PY = False
11+
HAVE_KWIK = False
12+
1313
from neo.io import kwikio
1414
from neo.test.iotest.common_io_test import BaseTestIO
1515

1616

17-
@unittest.skipUnless(HAVE_H5PY, "requires h5py")
18-
@unittest.skipUnless(kwikio.HAVE_KWIK, "requires klusta")
17+
@unittest.skipUnless( HAVE_KWIK, "requires klusta")
1918
class TestKwikIO(BaseTestIO, unittest.TestCase):
2019
ioclass = kwikio.KwikIO
2120
entities_to_download = [

neo/test/iotest/test_neomatlabio.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
from neo.core.irregularlysampledsignal import IrregularlySampledSignal
1111
from neo import Block, Segment, SpikeTrain
1212
from neo.test.iotest.common_io_test import BaseTestIO
13-
from neo.io.neomatlabio import NeoMatlabIO, HAVE_SCIPY
13+
from neo.io.neomatlabio import NeoMatlabIO
14+
15+
try:
16+
import scipy.io
17+
HAVE_SCIPY = True
18+
except:
19+
HAVE_SCIPY = False
1420

1521

1622
@unittest.skipUnless(HAVE_SCIPY, "requires scipy")

0 commit comments

Comments
 (0)