You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
REPL launch print test test_print_statement_non_darwin is skipped on Linux environments #26156
In python_files/pythonrc.py, the launch banner for the VS Code Native REPL displays a platform-dependent shortcut key: "Cmd" on Darwin (macOS) and "Ctrl" on all other platforms (Linux, Windows, etc.):
ctrl_key="Cmd"ifsys.platform=="darwin"else"Ctrl"print(f"{ctrl_key} click to launch VS Code Native REPL (https://aka.ms/python-native-repl)")
However, in python_files/tests/test_shell_integration.py, the test verifying this behavior for non-Darwin operating systems (test_print_statement_non_darwin) is guarded with if sys.platform == "win32": instead of if sys.platform != "darwin":.
As a consequence, when test suites run on Linux (such as Ubuntu CI runners or local Linux developer environments), sys.platform == "darwin" evaluates to False and sys.platform == "win32" also evaluates to False. Neither test_print_statement_darwin nor test_print_statement_non_darwin gets defined or executed, causing a silent test coverage gap on Linux platforms.
Steps to Reproduce
Check out the repository on a Linux system or container (sys.platform == "linux").
Run pytest targeting python_files/tests/test_shell_integration.py:
Notice that 0 print statement tests are collected or executed on Linux (collected 0 items / 0 selected).
Expected Behavior
On Linux systems (which are non-Darwin platforms), test_print_statement_non_darwin should be collected and executed to verify that "Ctrl click to launch VS Code Native REPL (https://aka.ms/python-native-repl)" is printed.
In python_files/pythonrc.py, the launch banner for the VS Code Native REPL displays a platform-dependent shortcut key: "Cmd" on Darwin (macOS) and "Ctrl" on all other platforms (Linux, Windows, etc.):
ctrl_key="Cmd"ifsys.platform=="darwin"else"Ctrl"print(f"{ctrl_key} click to launch VS Code Native REPL (https://aka.ms/python-native-repl)")
However, in python_files/tests/test_shell_integration.py, the test verifying this behavior for non-Darwin operating systems (test_print_statement_non_darwin) is guarded with if sys.platform == "win32": instead of if sys.platform != "darwin":.
As a consequence, when test suites run on Linux (such as Ubuntu CI runners or local Linux developer environments), sys.platform == "darwin" evaluates to False and sys.platform == "win32" also evaluates to False. Neither test_print_statement_darwin nor test_print_statement_non_darwin gets defined or executed, causing a silent test coverage gap on Linux platforms.
Steps to Reproduce
Check out the repository on a Linux system or container (sys.platform == "linux").
Run pytest targeting python_files/tests/test_shell_integration.py:
Notice that 0 print statement tests are collected or executed on Linux (collected 0 items / 0 selected).
Expected Behavior
On Linux systems (which are non-Darwin platforms), test_print_statement_non_darwin should be collected and executed to verify that "Ctrl click to launch VS Code Native REPL (https://aka.ms/python-native-repl)" is printed.
Activity
saitanallensantiago26-beep commentedon Sep 19, 2026
fix(testing): enable REPL launch print test for all non-Darwin platfo…