Skip to content

Commit 264063a

Browse files
committed
oups
1 parent 34a051f commit 264063a

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

neo/test/iotest/common_io_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@
3333
from neo.test.rawiotest.tools import can_use_network
3434
from neo.test.rawiotest.common_rawio_test import repo_for_test
3535
from neo.utils import (download_dataset,
36-
get_local_testing_data_folder, HAVE_DATALAD)
36+
get_local_testing_data_folder)
3737

38+
try:
39+
import datalad
40+
HAVE_DATALAD = True
41+
except:
42+
HAVE_DATALAD = False
3843

3944
from neo.test.iotest.tools import (cleanup_test_file,
4045
close_object_safe, create_generic_io_object,

neo/test/rawiotest/common_rawio_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@
2121
import unittest
2222

2323
from neo.utils.datasets import (download_dataset,
24-
get_local_testing_data_folder, HAVE_DATALAD, default_testing_repo)
24+
get_local_testing_data_folder, default_testing_repo)
2525

2626
from neo.test.rawiotest.tools import can_use_network
2727

2828
from neo.test.rawiotest import rawio_compliance as compliance
2929

30+
try:
31+
import datalad
32+
HAVE_DATALAD = True
33+
except:
34+
HAVE_DATALAD = False
3035

3136
# url_for_tests = "https://portal.g-node.org/neo/" #This is the old place
3237
repo_for_test = default_testing_repo

neo/test/rawiotest/tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55
import logging
66
import os
77

8-
from neo.utils import HAVE_DATALAD
9-
108
logger = logging.getLogger("neo.test")
119

1210

1311
def can_use_network():
1412
"""
1513
Return True if network access is allowed
1614
"""
15+
try:
16+
import datalad
17+
HAVE_DATALAD = True
18+
except:
19+
HAVE_DATALAD = False
20+
1721
if not HAVE_DATALAD:
1822
return False
1923
if os.environ.get('NOSETESTS_NO_NETWORK', False):

0 commit comments

Comments
 (0)