Skip to content

Commit d3e89ff

Browse files
committed
skip writable io if nixio not on machine
1 parent e803ef4 commit d3e89ff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

neo/test/iotest/test_get_io.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
from pathlib import Path
22
from tempfile import TemporaryDirectory
33
from neo.io import get_io, list_candidate_ios, NixIO
4+
import pytest
5+
try:
6+
import nixio
7+
HAVE_NIX = True
8+
except:
9+
HAVE_NIX = False
410

511

612
def test_list_candidate_ios_non_existant_file():
@@ -28,7 +34,7 @@ def test_list_candidate_ios_filename_stub():
2834

2935
assert NixIO in ios
3036

31-
37+
@pytest.mark.skipif(not HAVE_NIX, reason='Need nixio in order to return NixIO class')
3238
def test_get_io_non_existant_file_writable_io():
3339
# use nixio for testing with writable io
3440
non_existant_file = Path("non_existant_file.nix")

0 commit comments

Comments
 (0)