From d55aaa8186a9ee7c4267c91f66dc6afd79a6f609 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 00:40:36 +0200 Subject: [PATCH 1/3] improve debug failing warning test --- tests/tests_fabric/utilities/test_warnings.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/tests_fabric/utilities/test_warnings.py b/tests/tests_fabric/utilities/test_warnings.py index e39d52556bf24..414a7294f3ab3 100644 --- a/tests/tests_fabric/utilities/test_warnings.py +++ b/tests/tests_fabric/utilities/test_warnings.py @@ -40,16 +40,11 @@ cache.deprecation("test7") output = stderr.getvalue() - assert "test_warnings.py:30: UserWarning: test1" in output - assert "test_warnings.py:31: DeprecationWarning: test2" in output + base_line = 30 + expected_lines = [f"test_warnings.py:{base_line}: UserWarning: test1", f"test_warnings.py:{base_line+1}: DeprecationWarning: test2", f"test_warnings.py:{base_line+3}: UserWarning: test3", f"test_warnings.py:{base_line+4}: DeprecationWarning: test4", f"test_warnings.py:{base_line+6}: LightningDeprecationWarning: test5", f"test_warnings.py:{base_line+9}: UserWarning: test6", f"test_warnings.py:{base_line+10}: LightningDeprecationWarning: test7"] - assert "test_warnings.py:33: UserWarning: test3" in output - assert "test_warnings.py:34: DeprecationWarning: test4" in output - - assert "test_warnings.py:36: LightningDeprecationWarning: test5" in output - - assert "test_warnings.py:39: UserWarning: test6" in output - assert "test_warnings.py:40: LightningDeprecationWarning: test7" in output + for ln in expected_lines: + assert ln in output, f"Missing line `{ln}` in: \n{output}" # check that logging is properly configured import logging From b18e3f9d7e316d2d7c0e9d42d9a124a76c172a71 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 08:16:23 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/tests_fabric/utilities/test_warnings.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/tests_fabric/utilities/test_warnings.py b/tests/tests_fabric/utilities/test_warnings.py index 414a7294f3ab3..a8615caabfacc 100644 --- a/tests/tests_fabric/utilities/test_warnings.py +++ b/tests/tests_fabric/utilities/test_warnings.py @@ -41,7 +41,15 @@ output = stderr.getvalue() base_line = 30 - expected_lines = [f"test_warnings.py:{base_line}: UserWarning: test1", f"test_warnings.py:{base_line+1}: DeprecationWarning: test2", f"test_warnings.py:{base_line+3}: UserWarning: test3", f"test_warnings.py:{base_line+4}: DeprecationWarning: test4", f"test_warnings.py:{base_line+6}: LightningDeprecationWarning: test5", f"test_warnings.py:{base_line+9}: UserWarning: test6", f"test_warnings.py:{base_line+10}: LightningDeprecationWarning: test7"] + expected_lines = [ + f"test_warnings.py:{base_line}: UserWarning: test1", + f"test_warnings.py:{base_line+1}: DeprecationWarning: test2", + f"test_warnings.py:{base_line+3}: UserWarning: test3", + f"test_warnings.py:{base_line+4}: DeprecationWarning: test4", + f"test_warnings.py:{base_line+6}: LightningDeprecationWarning: test5", + f"test_warnings.py:{base_line+9}: UserWarning: test6", + f"test_warnings.py:{base_line+10}: LightningDeprecationWarning: test7", + ] for ln in expected_lines: assert ln in output, f"Missing line `{ln}` in: \n{output}" From 59c2557d8dabd74772696e00753552ec3e181c15 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:26:44 +0200 Subject: [PATCH 3/3] Update tests/tests_fabric/utilities/test_warnings.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Carlos MocholĂ­ --- tests/tests_fabric/utilities/test_warnings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_fabric/utilities/test_warnings.py b/tests/tests_fabric/utilities/test_warnings.py index a8615caabfacc..eac63cd77fd29 100644 --- a/tests/tests_fabric/utilities/test_warnings.py +++ b/tests/tests_fabric/utilities/test_warnings.py @@ -52,7 +52,7 @@ ] for ln in expected_lines: - assert ln in output, f"Missing line `{ln}` in: \n{output}" + assert ln in output, f"Missing line {ln!r} in:\n{output}" # check that logging is properly configured import logging