Skip to content

Commit

Permalink
Fix import of reload for python 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
amueller committed Nov 5, 2015
1 parent 45ef71f commit da4f480
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sklearn/tests/test_discriminant_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
# Python 3+ import for reload. Builtin in Python2
if version[1] == 3:
reload = None
from importlib import reload
else:
from importlib import reload


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

def test_deprecated_lda_qda_deprecation():
if reload is None:
SkipTest("Can't reload module on Python3.3")
raise SkipTest("Can't reload module on Python3.3")

def import_lda_module():
import sklearn.lda
Expand Down

0 comments on commit da4f480

Please sign in to comment.