From 5de61016126b32a3cbb8c0012dbed97764be858f Mon Sep 17 00:00:00 2001 From: Jan van Rijn Date: Sat, 10 Feb 2018 17:48:15 +0100 Subject: [PATCH] specified the error type that we expect in unit test --- tests/test_runs/test_run_functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_runs/test_run_functions.py b/tests/test_runs/test_run_functions.py index 1049d223b..cd51d4144 100644 --- a/tests/test_runs/test_run_functions.py +++ b/tests/test_runs/test_run_functions.py @@ -518,7 +518,10 @@ def test_get_run_trace(self): run = run.publish() self._wait_for_processed_run(run.run_id, 200) run_id = run.run_id - except openml.exceptions.PyOpenMLError: + except openml.exceptions.PyOpenMLError as e: + if 'Run already exists in server' not in e.message: + # in this case the error was not the one we expected + raise e # run was already flow = openml.flows.sklearn_to_flow(clf) flow_exists = openml.flows.flow_exists(flow.name, flow.external_version)