From f4c468e69721c044b7f23fee16abd23be9b6a576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20W=C3=A4lchli?= Date: Thu, 26 Aug 2021 10:10:42 +0200 Subject: [PATCH] mock experiment if test-tube not installed --- tests/deprecated_api/test_remove_1-7.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/deprecated_api/test_remove_1-7.py b/tests/deprecated_api/test_remove_1-7.py index 59987554ca759..ae8f9e1dcc53d 100644 --- a/tests/deprecated_api/test_remove_1-7.py +++ b/tests/deprecated_api/test_remove_1-7.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ Test deprecated functionality which will be removed in v1.7.0 """ +from unittest import mock import pytest @@ -90,6 +91,7 @@ def test_v1_7_0_trainer_prepare_data_per_node(tmpdir): _ = Trainer(prepare_data_per_node=False) -def test_v1_7_0_test_tube_logger(tmpdir): +@mock.patch("pytorch_lightning.loggers.test_tube.Experiment") +def test_v1_7_0_test_tube_logger(_, tmpdir): with pytest.deprecated_call(match="The TestTubeLogger is deprecated since v1.5 and will be removed in v1.7"): _ = TestTubeLogger(tmpdir)