From 03fe3b51f18d71c26b040b62b880fda0c7762f66 Mon Sep 17 00:00:00 2001 From: lezwon Date: Sat, 20 Jun 2020 20:46:02 +0530 Subject: [PATCH] flake fix --- tests/trainer/test_trainer.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/trainer/test_trainer.py b/tests/trainer/test_trainer.py index c9945aceab7cd..84b0525c8b2e7 100644 --- a/tests/trainer/test_trainer.py +++ b/tests/trainer/test_trainer.py @@ -804,28 +804,6 @@ def test_tpu_choice(tmpdir, tpu_cores, expected_tpu_id, error_expected): assert trainer.tpu_id == expected_tpu_id -@pytest.mark.parametrize(['tpu_cores', 'expected_tpu_id', 'error_expected'], [ - pytest.param(1, None, False), - pytest.param(8, None, False), - pytest.param([1], 1, False), - pytest.param([8], 8, False), - pytest.param('1,', 1, False), - pytest.param('1', None, False), - pytest.param('9, ', 9, True), - pytest.param([9], 9, True), - pytest.param([0], 0, True), - pytest.param(2, None, True), - pytest.param(10, None, True), -]) -def test_tpu_choice(tmpdir, tpu_cores, expected_tpu_id, error_expected): - if error_expected: - with pytest.raises(MisconfigurationException, match=r'.*tpu_cores` can only be 1, 8 or [<1-8>]*'): - Trainer(default_root_dir=tmpdir, tpu_cores=tpu_cores, auto_select_gpus=True) - else: - trainer = Trainer(default_root_dir=tmpdir, tpu_cores=tpu_cores, auto_select_gpus=True) - assert trainer.tpu_id == expected_tpu_id - - @pytest.mark.parametrize("trainer_kwargs,expected", [ pytest.param( dict(distributed_backend=None, gpus=None),