Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
# Checks for older scikit-learn versions (which also don't nicely work with
# Python3.7)
- DISTRIB="conda" PYTHON_VERSION="3.6" SKLEARN_VERSION="0.19.2"
- DISTRIB="conda" PYTHON_VERSION="3.6" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="3.6" SKLEARN_VERSION="0.18.2" SCIPY_VERSION=1.2.0

# Travis issue
# https://github.com/travis-ci/travis-ci/issues/8920
Expand Down
4 changes: 4 additions & 0 deletions ci_scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ popd
conda create -n testenv --yes python=$PYTHON_VERSION pip
source activate testenv

if [[ -v SCIPY_VERSION ]]; then
conda install --yes scipy=$SCIPY_VERSION
fi

python --version
pip install -e '.[test]'
python -c "import numpy; print('numpy %s' % numpy.__version__)"
Expand Down
6 changes: 4 additions & 2 deletions tests/test_datasets/test_dataset_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ def test__name_to_id_with_deactivated(self):

def test__name_to_id_with_multiple_active(self):
""" With multiple active datasets, retrieve the least recent active. """
self.assertEqual(openml.datasets.functions._name_to_id('iris'), 128)
openml.config.server = self.production_server
self.assertEqual(openml.datasets.functions._name_to_id('iris'), 61)

def test__name_to_id_with_version(self):
""" With multiple active datasets, retrieve the least recent active. """
self.assertEqual(openml.datasets.functions._name_to_id('iris', version=3), 151)
openml.config.server = self.production_server
self.assertEqual(openml.datasets.functions._name_to_id('iris', version=3), 969)

def test__name_to_id_with_multiple_active_error(self):
""" With multiple active datasets, retrieve the least recent active. """
Expand Down
15 changes: 8 additions & 7 deletions tests/test_setups/test_setup_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,22 @@ def test_list_setups_empty(self):
self.assertIsInstance(setups, dict)

def test_list_setups_output_format(self):
flow_id = 18
setups = openml.setups.list_setups(flow=flow_id, output_format='object')
openml.config.server = self.production_server
flow_id = 6794
setups = openml.setups.list_setups(flow=flow_id, output_format='object', size=10)
self.assertIsInstance(setups, Dict)
self.assertIsInstance(setups[list(setups.keys())[0]],
openml.setups.setup.OpenMLSetup)
self.assertGreater(len(setups), 0)
self.assertEqual(len(setups), 10)

setups = openml.setups.list_setups(flow=flow_id, output_format='dataframe')
setups = openml.setups.list_setups(flow=flow_id, output_format='dataframe', size=10)
self.assertIsInstance(setups, pd.DataFrame)
self.assertGreater(len(setups), 0)
self.assertEqual(len(setups), 10)

setups = openml.setups.list_setups(flow=flow_id, output_format='dict')
setups = openml.setups.list_setups(flow=flow_id, output_format='dict', size=10)
self.assertIsInstance(setups, Dict)
self.assertIsInstance(setups[list(setups.keys())[0]], Dict)
self.assertGreater(len(setups), 0)
self.assertEqual(len(setups), 10)

def test_setuplist_offset(self):
# TODO: remove after pull on live for better testing
Expand Down