From 58eb3966bea46cee04a88d190457f7650c4e383a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Kir=C3=A1ly?= Date: Sat, 17 May 2025 09:35:04 +0200 Subject: [PATCH 1/8] Update test_distribution.py --- tests/test_distribution.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_distribution.py b/tests/test_distribution.py index 5b4de7ed..d6ea8109 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -1,5 +1,7 @@ import numpy as np +import pytest from tqdm import tqdm + from hyperactive import Hyperactive @@ -71,12 +73,14 @@ def test_n_jobs_7(): hyper.run() +@pytest.mark.skip(reason="This test is not working on Windows") def test_multiprocessing_0(): hyper = Hyperactive(distribution="multiprocessing") hyper.add_search(objective_function, search_space, n_iter=15, n_jobs=2) hyper.run() +@pytest.mark.skip(reason="This test is not working on Windows") def test_multiprocessing_1(): hyper = Hyperactive( distribution={ From 317ad4012a125b9fb52155a4e1ce39d788dd6149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Kir=C3=A1ly?= Date: Sat, 17 May 2025 10:17:56 +0200 Subject: [PATCH 2/8] Update test_distribution.py --- tests/test_distribution.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_distribution.py b/tests/test_distribution.py index d6ea8109..12fb1b7d 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -119,6 +119,7 @@ def joblib_wrapper(process_func, search_processes_paras, n_jobs, **kwargs): hyper.run() +@pytest.mark.skip(reason="This test is not working on Windows") def test_pathos_0(): hyper = Hyperactive(distribution="pathos") hyper.add_search(objective_function, search_space, n_iter=15, n_jobs=2) From f6f66fee894b74ea31a2ab389705ecc3286c1657 Mon Sep 17 00:00:00 2001 From: Simon Blanke Date: Sat, 17 May 2025 12:15:03 +0200 Subject: [PATCH 3/8] skip tests for windows --- tests/test_distribution.py | 6 +++--- tests/test_empty_output/test_empty_output.py | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test_distribution.py b/tests/test_distribution.py index 12fb1b7d..ab11117c 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -4,6 +4,9 @@ from hyperactive import Hyperactive +if sys.platform.startswith("win"): + pytest.skip("skip these tests for windows", allow_module_level=True) + def objective_function(opt): score = -opt["x1"] * opt["x1"] @@ -73,14 +76,12 @@ def test_n_jobs_7(): hyper.run() -@pytest.mark.skip(reason="This test is not working on Windows") def test_multiprocessing_0(): hyper = Hyperactive(distribution="multiprocessing") hyper.add_search(objective_function, search_space, n_iter=15, n_jobs=2) hyper.run() -@pytest.mark.skip(reason="This test is not working on Windows") def test_multiprocessing_1(): hyper = Hyperactive( distribution={ @@ -119,7 +120,6 @@ def joblib_wrapper(process_func, search_processes_paras, n_jobs, **kwargs): hyper.run() -@pytest.mark.skip(reason="This test is not working on Windows") def test_pathos_0(): hyper = Hyperactive(distribution="pathos") hyper.add_search(objective_function, search_space, n_iter=15, n_jobs=2) diff --git a/tests/test_empty_output/test_empty_output.py b/tests/test_empty_output/test_empty_output.py index dddef388..16788e8b 100644 --- a/tests/test_empty_output/test_empty_output.py +++ b/tests/test_empty_output/test_empty_output.py @@ -1,4 +1,9 @@ -import os, sys, subprocess +import os, sys, subprocess, pytest + + +if sys.platform.startswith("win"): + pytest.skip("skip these tests for windows", allow_module_level=True) + here = os.path.dirname(os.path.abspath(__file__)) From d39201fd669965bf2464480da8b288e48e8d2c10 Mon Sep 17 00:00:00 2001 From: Simon Blanke Date: Sat, 17 May 2025 12:20:57 +0200 Subject: [PATCH 4/8] fix import --- tests/test_distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_distribution.py b/tests/test_distribution.py index ab11117c..c0a3d93b 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -1,5 +1,5 @@ import numpy as np -import pytest +import sys, pytest from tqdm import tqdm from hyperactive import Hyperactive From 99dd88741a79b5c2dda2a1646a9f1f392f511d71 Mon Sep 17 00:00:00 2001 From: Simon Blanke Date: Sat, 17 May 2025 12:43:00 +0200 Subject: [PATCH 5/8] remove search-space tests from windows CI testing --- tests/test_search_spaces.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_search_spaces.py b/tests/test_search_spaces.py index 859c23e1..0fad3b54 100644 --- a/tests/test_search_spaces.py +++ b/tests/test_search_spaces.py @@ -1,9 +1,14 @@ +import sys import numpy as np import pandas as pd from hyperactive import Hyperactive +if sys.platform.startswith("win"): + pytest.skip("skip these tests for windows", allow_module_level=True) + + def test_search_space_0(): def objective_function(opt): score = -opt["x1"] * opt["x1"] From de912c3fa659e808b4b5c1d0e814587cdc563f2f Mon Sep 17 00:00:00 2001 From: Simon Blanke Date: Sat, 17 May 2025 12:48:23 +0200 Subject: [PATCH 6/8] add import --- tests/test_search_spaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_search_spaces.py b/tests/test_search_spaces.py index 0fad3b54..f8f59d38 100644 --- a/tests/test_search_spaces.py +++ b/tests/test_search_spaces.py @@ -1,4 +1,4 @@ -import sys +import sys, pytest import numpy as np import pandas as pd From 275282abc92b6f1032527fcd2d3d18f8b9f94646 Mon Sep 17 00:00:00 2001 From: Simon Blanke Date: Sat, 17 May 2025 13:00:56 +0200 Subject: [PATCH 7/8] remove even more tests, because windows... --- tests/test_warm_starts/test_memory_warm_start.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_warm_starts/test_memory_warm_start.py b/tests/test_warm_starts/test_memory_warm_start.py index e229c03b..2aebbc05 100644 --- a/tests/test_warm_starts/test_memory_warm_start.py +++ b/tests/test_warm_starts/test_memory_warm_start.py @@ -1,11 +1,15 @@ import time -import pytest +import pytest, sys import numpy as np import pandas as pd from hyperactive import Hyperactive +if sys.platform.startswith("win"): + pytest.skip("skip these tests for windows", allow_module_level=True) + + def func1(): pass From 58dae0089186907a8cb57044af4a23e1fb911a55 Mon Sep 17 00:00:00 2001 From: Simon Blanke Date: Sat, 17 May 2025 13:01:53 +0200 Subject: [PATCH 8/8] skip more tests, because windows... --- tests/test_warm_starts/test_warm_start.py | 6 +++++- tests/test_warm_starts/test_warm_start_smbo.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_warm_starts/test_warm_start.py b/tests/test_warm_starts/test_warm_start.py index b32fde01..3a2e2a8d 100644 --- a/tests/test_warm_starts/test_warm_start.py +++ b/tests/test_warm_starts/test_warm_start.py @@ -1,11 +1,15 @@ import time -import pytest +import pytest, sys import numpy as np import pandas as pd from hyperactive import Hyperactive +if sys.platform.startswith("win"): + pytest.skip("skip these tests for windows", allow_module_level=True) + + def func1(): pass diff --git a/tests/test_warm_starts/test_warm_start_smbo.py b/tests/test_warm_starts/test_warm_start_smbo.py index 57c0519d..b818e58e 100644 --- a/tests/test_warm_starts/test_warm_start_smbo.py +++ b/tests/test_warm_starts/test_warm_start_smbo.py @@ -1,5 +1,5 @@ import time -import pytest +import pytest, sys import numpy as np import pandas as pd @@ -14,6 +14,10 @@ ) +if sys.platform.startswith("win"): + pytest.skip("skip these tests for windows", allow_module_level=True) + + def func1(): pass