File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ class TestAPIConnector(unittest.TestCase):
2828 """
2929
3030 def setUp (self ):
31+ config_file = os .path .expanduser ('~/.openml/config' )
32+ if not os .path .exists (config_file ):
33+ raise Exception ("OpenML config file required to run unit tests. "
34+ "See https://github.com/openml/OpenML/wiki/Client-API" )
35+
3136 self .cwd = os .getcwd ()
3237 workdir = os .path .dirname (os .path .abspath (__file__ ))
3338 self .workdir = os .path .join (workdir , "tmp" )
@@ -43,11 +48,6 @@ def setUp(self):
4348 self .connector = APIConnector (cache_directory = self .workdir )
4449 print (self .connector ._session_hash )
4550
46- config_file = os .path .expanduser ('~/.openml/config' )
47- if not os .path .exists (config_file ):
48- raise Exception ("OpenML config file required to run unit tests. "
49- "See https://github.com/openml/OpenML/wiki/Client-API" )
50-
5151 def tearDown (self ):
5252 os .chdir (self .cwd )
5353 shutil .rmtree (self .workdir )
You can’t perform that action at this time.
0 commit comments