test: add missing test coverage for PRs #327, #367#459
Open
edvilme wants to merge 6 commits intomicrosoft:mainfrom
Open
test: add missing test coverage for PRs #327, #367#459edvilme wants to merge 6 commits intomicrosoft:mainfrom
edvilme wants to merge 6 commits intomicrosoft:mainfrom
Conversation
…crosoft#458, relates to microsoft#327) Verify that _get_global_defaults() reads ignorePatterns from GLOBAL_SETTINGS instead of always returning an empty list. Also covers showNotifications and importStrategy global settings fallback paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsoft#458, relates to microsoft#367) Verify that log_to_output, log_error, log_warning, and log_always use the Pygls 2 window_log_message/window_show_message APIs. Tests cover all LS_SHOW_NOTIFICATION gating levels (off, onError, onWarning, always) to ensure notification popups are shown at the correct thresholds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rchiodo
reviewed
Apr 1, 2026
rchiodo
reviewed
Apr 1, 2026
rchiodo
reviewed
Apr 1, 2026
- Extract duplicated _setup_mocks() into conftest.py with session teardown - Unify _FlexClass (kwargs-storing variant) to eliminate subtle divergence - Replace _patch_lsp_server() with patched_lsp_server fixture using patch.object for automatic restoration (fixes state leak between tests) - Use real lsp_utils/lsp_jsonrpc from bundled/tool instead of partial mocks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds missing test coverage for merged PRs, as tracked by #458.
Part of the cross-repo test coverage initiative: microsoft/vscode-python-tools-extension-template#290
Tests added
PR #327 — ignorePatterns from global settings
test_global_defaults.py: Verifies_get_global_defaults()readsignorePatternsfromGLOBAL_SETTINGS; coversshowNotificationsandimportStrategyfallback pathsPR #367 — Pygls 2 API migration
test_logging.py: Verifies logging helpers use Pygls 2window_log_message/window_show_messageAPIs; testsLS_SHOW_NOTIFICATIONgating levels (off, onError, onWarning, always)Skipped PRs
Refs #458