Skip to content

Commit da4f480

Browse files
committed
Fix import of reload for python 3.3
1 parent 45ef71f commit da4f480

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/tests/test_discriminant_analysis.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
# Python 3+ import for reload. Builtin in Python2
2626
if version[1] == 3:
2727
reload = None
28-
from importlib import reload
28+
else:
29+
from importlib import reload
2930

3031

3132
# Data is just 6 separable points in the plane
@@ -305,7 +306,7 @@ def test_qda_regularization():
305306

306307
def test_deprecated_lda_qda_deprecation():
307308
if reload is None:
308-
SkipTest("Can't reload module on Python3.3")
309+
raise SkipTest("Can't reload module on Python3.3")
309310

310311
def import_lda_module():
311312
import sklearn.lda

0 commit comments

Comments
 (0)