8000 FIX don't raise file-level SkipTests · Felixhawk/scikit-learn@e24e391 · GitHub
[go: up one dir, main page]

Skip to content

Commit e24e391

Browse files
committed
FIX don't raise file-level SkipTests
1 parent 7e7dc78 commit e24e391

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sklearn/utils/sparsetools/tests/test_traversal.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
csgraph_to_dense, csgraph_from_dense
1010
except ImportError:
1111
# Oldish versions of scipy don't have that
12-
raise SkipTest("Old version of scipy, doesn't have csgraph.")
12+
csgraph_from_dense = None
1313

1414

1515
def test_graph_breadth_first():
16+
if csgraph_from_dense is None:
17+
raise SkipTest("Old version of scipy, doesn't have csgraph.")
1618
csgraph = np.array([[0, 1, 2, 0, 0],
1719
[1, 0, 0, 0, 3],
1820
[2, 0, 0, 7, 0],
@@ -33,6 +35,8 @@ def test_graph_breadth_first():
3335

3436

3537
def test_graph_depth_first():
38+
if csgraph_from_dense is None:
39+
raise SkipTest("Old version of scipy, doesn't have csgraph.")
3640
csgraph = np.array([[0, 1, 2, 0, 0],
3741
[1, 0, 0, 0, 3],
3842
[2, 0, 0, 7, 0],

0 commit comments

Comments
 (0)
0