From 02ed1fc7c732e5ed141b0124de183290c5d45f9f Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 10 May 2025 12:18:12 -0700 Subject: [PATCH] python3Packages.tensordict: disable tests that hangs on Darwin Tests that use a pool can hang forever on osx. This disables two test files on Darwin. --- .../python-modules/tensordict/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/tensordict/default.nix b/pkgs/development/python-modules/tensordict/default.nix index 2069d5586bf5..b9cdacb54c29 100644 --- a/pkgs/development/python-modules/tensordict/default.nix +++ b/pkgs/development/python-modules/tensordict/default.nix @@ -71,14 +71,23 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = [ - # FileNotFoundError: [Errno 2] No such file or directory: '/build/source/tensordict/tensorclass.pyi - "test_tensorclass_instance_methods" - "test_tensorclass_stub_methods" + disabledTests = + [ + # FileNotFoundError: [Errno 2] No such file or directory: '/build/source/tensordict/tensorclass.pyi + "test_tensorclass_instance_methods" + "test_tensorclass_stub_methods" - # hangs forever on some CPUs - "test_map_iter_interrupt_early" - ]; + # hangs forever on some CPUs + "test_map_iter_interrupt_early" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Hangs due to the use of a pool + "test_chunksize_num_chunks" + "test_index_with_generator" + "test_map_exception" + "test_map" + "test_multiprocessing" + ]; disabledTestPaths = [ @@ -88,6 +97,9 @@ buildPythonPackage rec { ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Hangs forever "test/test_distributed.py" + # Hangs after testing due to pool usage + "test/test_h5.py" + "test/test_memmap.py" ]; meta = {