From f9e2f85effdfc2d0a7aeecfdc115e3dde48de01c Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Wed, 22 Jan 2025 18:39:20 -0500 Subject: [PATCH] ruff my imports --- python_files/tests/test_shell_integration.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python_files/tests/test_shell_integration.py b/python_files/tests/test_shell_integration.py index 4c44341e94c1..376cb466bb50 100644 --- a/python_files/tests/test_shell_integration.py +++ b/python_files/tests/test_shell_integration.py @@ -2,6 +2,7 @@ import platform import sys from unittest.mock import Mock + import pythonrc is_wsl = "microsoft-standard-WSL" in platform.release() @@ -61,7 +62,9 @@ def test_excepthook_call(): hooks.my_excepthook("mock_type", "mock_value", "mock_traceback") mock_excepthook.assert_called_once_with("mock_type", "mock_value", "mock_traceback") + if sys.platform == "darwin": + def test_print_statement_darwin(monkeypatch): importlib.reload(pythonrc) with monkeypatch.context() as m: @@ -69,7 +72,9 @@ def test_print_statement_darwin(monkeypatch): importlib.reload(sys.modules["pythonrc"]) print.assert_any_call("Cmd click to launch VS Code Native REPL") + if sys.platform == "win32": + def test_print_statement_non_darwin(monkeypatch): importlib.reload(pythonrc) with monkeypatch.context() as m: