Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Revisit environment variable collection in terminalEnvVarCollectionService test #24738

Copy link
Copy link
Closed
@anthonykim1

Description

@anthonykim1
Issue body actions

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

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsdebtCovers everything internal: CI, testing, refactoring of the codebase, etc.Covers everything internal: CI, testing, refactoring of the codebase, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.