From 02ea55bbf6abccde1e337e966e2f19461a0d9224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20W=C3=A4lchli?= Date: Fri, 26 Feb 2021 01:55:07 +0100 Subject: [PATCH] patch os environ --- tests/accelerators/test_accelerator_connector.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/accelerators/test_accelerator_connector.py b/tests/accelerators/test_accelerator_connector.py index 9e39bf215a..a61a14a6aa 100644 --- a/tests/accelerators/test_accelerator_connector.py +++ b/tests/accelerators/test_accelerator_connector.py @@ -385,6 +385,7 @@ def test_accelerator_choice_ddp_cpu_slurm(device_count_mock, setup_distributed_m trainer.fit(model) +@mock.patch.dict(os.environ, {}) @mock.patch('torch.cuda.device_count', return_value=0) @pytest.mark.parametrize("ddp_plugin_class", [DDPPlugin, DDPSpawnPlugin]) def test_accelerator_choice_ddp_cpu_custom_plugin(_, ddp_plugin_class):