Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit environment variable collection in terminalEnvVarCollectionService test #24738

Closed
anthonykim1 opened this issue Jan 23, 2025 · 0 comments · Fixed by #24739
Closed

Revisit environment variable collection in terminalEnvVarCollectionService test #24738

anthonykim1 opened this issue Jan 23, 2025 · 0 comments · Fixed by #24739
Assignees
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc.

Comments

@anthonykim1
Copy link

API mentions

		/**
		 * Gets the extension's global environment variable collection for this workspace, enabling changes to be
		 * applied to terminal environment variables.
		 */
		readonly environmentVariableCollection: GlobalEnvironmentVariableCollection;

so

        when(context.environmentVariableCollection).thenReturn(instance(globalCollection));
        when(globalCollection.getScoped(anything())).thenReturn(instance(collection));

in src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts IS actually correct.

Should delete question

 // Question: Why do we have to set up environmentVariableCollection and globalEnvironmentVariableCollection in this flip-flop way?
        // Reference: /vscode-python/src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts

metnioned in src/test/terminals/shellIntegration/pythonStartup.test.ts

@anthonykim1 anthonykim1 added area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. labels Jan 23, 2025
@anthonykim1 anthonykim1 self-assigned this Jan 23, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 23, 2025
@anthonykim1 anthonykim1 removed the triage-needed Needs assignment to the proper sub-team label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant