From 0166906e7c78b7ba1aeb0ccd19acd790427a49af Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sun, 5 Oct 2025 15:27:09 -0700 Subject: [PATCH] python3Packages.optuna: disable tests that fail on Darwin Permission denied: '/tmp/optuna_find_free_port.lock' --- pkgs/development/python-modules/optuna/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/optuna/default.nix b/pkgs/development/python-modules/optuna/default.nix index a7407fdec887..07ee8fa12d60 100644 --- a/pkgs/development/python-modules/optuna/default.nix +++ b/pkgs/development/python-modules/optuna/default.nix @@ -138,6 +138,18 @@ buildPythonPackage rec { "test_visualizations_with_single_objectives" ]; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ + # PermissionError: [Errno 13] Permission denied: '/tmp/optuna_find_free_port.lock' + "tests/storages_tests/journal_tests/test_combination_with_grpc.py" + "tests/storages_tests/test_grpc.py" + "tests/storages_tests/test_storages.py" + "tests/study_tests/test_dataframe.py" + "tests/study_tests/test_optimize.py" + "tests/study_tests/test_study.py" + "tests/trial_tests/test_frozen.py" + "tests/trial_tests/test_trial.py" + ]; + __darwinAllowLocalNetworking = true; pythonImportsCheck = [ "optuna" ];