File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,8 @@ def _parse_config(self):
237237 'private_directory' : os .path .expanduser ('~/.openml/private' )}
238238
239239 config_file = os .path .expanduser ('~/.openml/config' )
240+ # Save the config file to check its existence at test time
241+ self .config_file = config_file
240242 config = configparser .RawConfigParser (defaults = defaults )
241243
242244 if not os .path .exists (config_file ):
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ def setUp(self):
4343 self .connector = APIConnector (cache_directory = self .workdir )
4444 print (self .connector ._session_hash )
4545
46+ if not os .path .exists (self .connector .config_file ):
47+ raise Exception ("OpenML config file required to run unit tests. "
48+ "See https://github.com/openml/OpenML/wiki/Client-API" )
49+
4650 def tearDown (self ):
4751 os .chdir (self .cwd )
4852 shutil .rmtree (self .workdir )
You can’t perform that action at this time.
0 commit comments