66import openml .exceptions
77from openml .testing import TestBase
88
9+ from sklearn .ensemble import BaggingClassifier
10+ from sklearn .tree import DecisionTreeClassifier
11+
912if sys .version_info [0 ] >= 3 :
1013 from unittest import mock
1114else :
@@ -27,8 +30,7 @@ def get_sentinel():
2730class TestRun (TestBase ):
2831
2932 def test_nonexisting_setup_exists (self ):
30- from sklearn .tree import DecisionTreeClassifier
31- # first publish a nonexiting flow
33+ # first publish a non-existing flow
3234 sentinel = get_sentinel ()
3335 dectree = DecisionTreeClassifier ()
3436 flow = openml .flows .sklearn_to_flow (dectree )
@@ -38,12 +40,10 @@ def test_nonexisting_setup_exists(self):
3840 # although the flow exists, we can be sure there are no
3941 # setups (yet) as it hasn't been ran
4042 setup_id = openml .setups .setup_exists (flow , dectree )
41- self .assertEquals (setup_id , False )
43+ self .assertFalse (setup_id )
4244
4345
4446 def test_existing_setup_exists (self ):
45- from sklearn .ensemble import BaggingClassifier
46- from sklearn .tree import DecisionTreeClassifier
4747 # first publish a nonexiting flow
4848 bagging = BaggingClassifier (DecisionTreeClassifier (max_depth = 5 ,
4949 min_samples_split = 3 ),
@@ -57,7 +57,7 @@ def test_existing_setup_exists(self):
5757 # although the flow exists, we can be sure there are no
5858 # setups (yet) as it hasn't been ran
5959 setup_id = openml .setups .setup_exists (flow , bagging )
60- self .assertEquals (setup_id , False )
60+ self .assertFalse (setup_id )
6161
6262 # now run the flow on an easy task:
6363 task = openml .tasks .get_task (115 ) #diabetes
0 commit comments