Skip to content

Commit 2b2aee9

Browse files
committed
fix: address review feedback - consistent naming for reset flag (PR #1290)
1 parent b1c55e9 commit 2b2aee9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/managers/common/nativePythonFinder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,9 @@ function getGlobalSearchPaths(): string[] {
845845
let workspaceSearchPathsGlobalWarningShown = false;
846846

847847
/**
848-
* Resets the error flag for testing purposes.
848+
* @internal Test-only helper to reset the workspaceSearchPaths global-level warning flag.
849849
*/
850-
export function resetWorkspaceSearchPathsErrorFlag(): void {
850+
export function resetWorkspaceSearchPathsGlobalWarningFlag(): void {
851851
workspaceSearchPathsGlobalWarningShown = false;
852852
}
853853

src/test/managers/common/nativePythonFinder.getAllExtraSearchPaths.unit.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as pathUtils from '../../../common/utils/pathUtils';
66
import * as workspaceApis from '../../../common/workspace.apis';
77

88
// Import the function under test
9-
import { getAllExtraSearchPaths, resetWorkspaceSearchPathsErrorFlag } from '../../../managers/common/nativePythonFinder';
9+
import { getAllExtraSearchPaths, resetWorkspaceSearchPathsGlobalWarningFlag } from '../../../managers/common/nativePythonFinder';
1010

1111
interface MockWorkspaceConfig {
1212
get: sinon.SinonStub;
@@ -26,7 +26,7 @@ suite('getAllExtraSearchPaths Integration Tests', () => {
2626
let envConfig: MockWorkspaceConfig;
2727

2828
setup(() => {
29-
resetWorkspaceSearchPathsErrorFlag();
29+
resetWorkspaceSearchPathsGlobalWarningFlag();
3030

3131
// Mock VS Code workspace APIs
3232
mockGetConfiguration = sinon.stub(workspaceApis, 'getConfiguration');
@@ -89,7 +89,7 @@ suite('getAllExtraSearchPaths Integration Tests', () => {
8989

9090
teardown(() => {
9191
sinon.restore();
92-
resetWorkspaceSearchPathsErrorFlag();
92+
resetWorkspaceSearchPathsGlobalWarningFlag();
9393
});
9494

9595
suite('Legacy Path Consolidation Tests', () => {
@@ -358,7 +358,7 @@ suite('getAllExtraSearchPaths Integration Tests', () => {
358358
assert.strictEqual(
359359
matchingCalls.length,
360360
1,
361-
`Expected exactly 1 warning about workspaceSearchPaths global level, got ${matchingCalls.length}`,
361+
`Expected exactly 1 error about workspaceSearchPaths global level, got ${matchingCalls.length}`,
362362
);
363363
});
364364

0 commit comments

Comments
 (0)