Skip to content

Commit 61dd786

Browse files
Added a test to check if datasets are not run because openml.org does not work
See https://github.com/orgs/openml/discussions/20
1 parent e87d363 commit 61dd786

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test_linear_ensemble.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_output_str(self):
1818
"""Tests, given a certain model, whether the expected output results occur"""
1919
# so that the maximum diff is printed
2020
self.maxDiff = None
21+
counter = 0
2122
for fetched_dataset, openml_dataset, combined_df in get_custom_datasets(self.custom_datagroup_testing):
2223
try:
2324
f = io.StringIO()
@@ -34,7 +35,8 @@ def test_output_str(self):
3435
self.assertEqual(str(output_appender), f.getvalue())
3536
except Exception as e:
3637
self.fail(f"Exception '{e}' occurred")
37-
38+
counter += 1
39+
self.assertEqual(counter, len(self.custom_datagroup_testing), msg=f"Less datasets were run than expected: {counter} vs {len(self.custom_datagroup_testing)}")
3840

3941
if __name__ == '__main__':
4042
unittest.main()

0 commit comments

Comments
 (0)