Skip to content

Commit

Permalink
Merge pull request #217 from JustasB/dev
Browse files Browse the repository at this point in the history
Travis fix
  • Loading branch information
rgerkin authored Apr 21, 2019
2 parents b668559 + 372e740 commit 8d4690e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
18 changes: 2 additions & 16 deletions neuronunit/models/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,8 @@
from sciunit.utils import dict_hash, import_module_from_path, \
TemporaryDirectory

try:
# Never import neuron in the current directory, or it will automatically
# load mechanisms in that directory, which will then cause future calls
# to load_mechanisms() to fail due to already loaded mechanisms.
temp = TemporaryDirectory()
curr = os.getcwd()
os.chdir(temp.name)
import neuron
from neuron import h
NEURON_SUPPORT = True
os.chdir(curr)
temp.cleanup()
except:
neuron = None
h = None
NEURON_SUPPORT = False
# Test for NEURON support in a separate python process
NEURON_SUPPORT = (os.system("python -c 'import neuron' > /dev/null 2>&1") == 0)

try:
import pyNN
Expand Down
2 changes: 1 addition & 1 deletion neuronunit/models/lems.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
try:
from urllib.parse import urljoin
except ImportError:
from urllib import urljoin
from urlparse import urljoin

import requests
import validators
Expand Down

0 comments on commit 8d4690e

Please # to comment.