Skip to content

Commit 6156876

Browse files
authored
Merge branch 'main' into feature/implement_copy_import_path
2 parents 6fb135d + a3dd3aa commit 6156876

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@
325325
{
326326
"category": "Python",
327327
"command": "python.execSelectionInTerminal",
328-
"title": "%python.command.python.execSelectionInTerminal.title%"
328+
"title": "%python.command.python.execSelectionInTerminal.title%",
329+
"shortTitle": "%python.command.python.execSelectionInTerminal.shortTitle%"
329330
},
330331
{
331332
"category": "Python",

package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"python.command.python.createTerminal.title": "Create Terminal",
77
"python.command.python.execInTerminal.title": "Run Python File in Terminal",
88
"python.command.python.execInTerminalIcon.title": "Run Python File",
9-
"python.command.python.execInDedicatedTerminal.title": "Run Python File in Dedicated Terminal",
9+
"python.command.python.execInDedicatedTerminal.title": "Run Python File in Dedicated Terminal",
1010
"python.command.python.setInterpreter.title": "Select Interpreter",
1111
"python.command.python.clearWorkspaceInterpreter.title": "Clear Workspace Interpreter Setting",
1212
"python.command.python.viewOutput.title": "Show Output",
@@ -15,6 +15,7 @@
1515
"python.command.python.configureTests.title": "Configure Tests",
1616
"python.command.testing.rerunFailedTests.title": "Rerun Failed Tests",
1717
"python.command.python.execSelectionInTerminal.title": "Run Selection/Line in Python Terminal",
18+
"python.command.python.execSelectionInTerminal.shortTitle": "Run Selection/Line",
1819
"python.command.python.execInREPL.title": "Run Selection/Line in Native Python REPL",
1920
"python.command.python.execSelectionInDjangoShell.title": "Run Selection/Line in Django Shell",
2021
"python.command.python.reportIssue.title": "Report Issue...",

src/client/terminals/envCollectionActivation/service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import {
4444
} from '../types';
4545
import { ProgressService } from '../../common/application/progressService';
4646
import { useEnvExtension } from '../../envExt/api.internal';
47+
import { registerPythonStartup } from '../pythonStartup';
4748

4849
@injectable()
4950
export class TerminalEnvVarCollectionService implements IExtensionActivationService, ITerminalEnvVarCollectionService {
@@ -109,6 +110,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
109110
);
110111
this.registeredOnce = true;
111112
}
113+
await registerPythonStartup(this.context);
112114
return;
113115
}
114116
if (!this.registeredOnce) {

src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
import * as sinon from 'sinon';
77
import { assert, expect } from 'chai';
88
import { mock, instance, when, anything, verify, reset } from 'ts-mockito';
9+
import * as TypeMoq from 'typemoq';
910
import {
1011
EnvironmentVariableCollection,
1112
EnvironmentVariableMutatorOptions,
1213
GlobalEnvironmentVariableCollection,
1314
ProgressLocation,
1415
Uri,
16+
WorkspaceConfiguration,
1517
WorkspaceFolder,
1618
} from 'vscode';
1719
import {
@@ -55,6 +57,7 @@ suite('Terminal Environment Variable Collection Service', () => {
5557
let terminalEnvVarCollectionService: TerminalEnvVarCollectionService;
5658
let terminalDeactivateService: ITerminalDeactivateService;
5759
let useEnvExtensionStub: sinon.SinonStub;
60+
let pythonConfig: TypeMoq.IMock<WorkspaceConfiguration>;
5861
const progressOptions = {
5962
location: ProgressLocation.Window,
6063
title: Interpreters.activatingTerminals,
@@ -122,6 +125,8 @@ suite('Terminal Environment Variable Collection Service', () => {
122125
instance(shellIntegrationService),
123126
instance(envVarProvider),
124127
);
128+
pythonConfig = TypeMoq.Mock.ofType<WorkspaceConfiguration>();
129+
pythonConfig.setup((p) => p.get('terminal.shellIntegration.enabled')).returns(() => false);
125130
});
126131

127132
teardown(() => {

0 commit comments

Comments
 (0)