Skip to content

Commit 21b1d44

Browse files
committed
skip on csa import error
1 parent 0563688 commit 21b1d44

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

spynnaker/pyNN/models/neural_projections/connectors/csa_connector.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
try:
2828
import csa # type: ignore[import]
2929
_csa_import_error: Optional[ImportError] = None
30+
raise ImportError("pop")
3031
except ImportError as __ex:
3132
# Importing csa causes problems with readthedocs so allowing it to fail
3233
_csa_import_error = __ex

spynnaker_integration_tests/test_connectors/test_csa_connector.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
from typing import Optional, Tuple, Union
16+
from unittest import SkipTest
1617
import numpy
1718
import csa # type: ignore[import]
1819
from pyNN.space import BaseStructure
@@ -36,7 +37,12 @@ def do_csa_nd_test(
3637
post_size, p.IF_curr_exp(), structure=post_shape)
3738
post.set_max_atoms_per_core(neurons_per_core_post)
3839

39-
conn = p.CSAConnector(cset)
40+
try:
41+
conn = p.CSAConnector(cset)
42+
except ImportError:
43+
p.end()
44+
raise SkipTest(
45+
"Unable to import CSA likely due to python version")
4046
proj = p.Projection(
4147
pre, post, conn, p.StaticSynapse(weight=1.0, delay=1.0))
4248
p.run(0)

0 commit comments

Comments
 (0)