We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1161a8 commit 40dd174Copy full SHA for 40dd174
1 file changed
tests/test_apiconnector.py
@@ -46,12 +46,22 @@ def setUp(self):
46
os.chdir(self.workdir)
47
48
self.cached = True
49
- self.connector = APIConnector(cache_directory=self.workdir)
50
try:
51
apikey = os.environ['OPENMLAPIKEY']
52
except:
53
apikey = None
54
+ try:
55
+ travis = os.environ['TRAVIS']
56
+ if apikey is None:
57
+ raise Exception('Running on travis-ci, but no environment '
58
+ 'variable OPENMLAPIKEY found.')
59
+ except:
60
+ pass
61
+
62
+ self.connector = APIConnector(cache_directory=self.workdir,
63
+ apikey=apikey)
64
65
def tearDown(self):
66
os.chdir(self.cwd)
67
shutil.rmtree(self.workdir)
0 commit comments