Skip to content

When using pipenv, install packages (such as linters, test frameworks) in dev-packages #1134

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

Merged
merged 1 commit into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/1 Enhancements/1110.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When using pipenv, install packages (such as linters, test frameworks) in dev-packages.
2 changes: 1 addition & 1 deletion src/client/common/installer/pipEnvInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class PipEnvInstaller implements IModuleInstaller {

public installModule(name: string): Promise<void> {
const terminalService = this.serviceContainer.get<ITerminalServiceFactory>(ITerminalServiceFactory).getTerminalService();
return terminalService.sendCommand(pipenvName, ['install', name]);
return terminalService.sendCommand(pipenvName, ['install', name, '--dev']);
}

public async isSupported(resource?: Uri): Promise<boolean> {
Expand Down
4 changes: 2 additions & 2 deletions src/test/common/moduleInstaller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ suite('Module Installer', () => {

let argsSent: string[] = [];
mockTerminalService
.setup(async t => await t.sendCommand(TypeMoq.It.isAnyString(), TypeMoq.It.isAny()))
.setup(t => t.sendCommand(TypeMoq.It.isAnyString(), TypeMoq.It.isAny()))
.returns((cmd: string, args: string[]) => { argsSent = args; return Promise.resolve(void 0); });
await pipInstaller.installModule(moduleName);

Expand Down Expand Up @@ -255,6 +255,6 @@ suite('Module Installer', () => {
await pipInstaller.installModule(moduleName);

expect(command!).equal('pipenv', 'Invalid command sent to terminal for installation.');
expect(argsSent.join(' ')).equal(`install ${moduleName}`, 'Invalid command arguments sent to terminal for installation.');
expect(argsSent.join(' ')).equal(`install ${moduleName} --dev`, 'Invalid command arguments sent to terminal for installation.');
});
});