Skip to content

Commit 551e100

Browse files
committed
add unit test for installing black with poetry
1 parent 710efb0 commit 551e100

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/test/common/installer/poetryInstaller.unit.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,15 @@ suite('Module Installer - Poetry', () => {
122122

123123
assert.deepEqual(info, { args: ['add', '--dev', 'something'], execPath: 'poetry path' });
124124
});
125+
test('Get executable info when installing black', async () => {
126+
const uri = Uri.file(__dirname);
127+
const settings = mock(PythonSettings);
128+
129+
when(configurationService.getSettings(uri)).thenReturn(instance(settings));
130+
when(settings.poetryPath).thenReturn('poetry path');
131+
132+
const info = await poetryInstaller.getExecutionInfo('black', uri);
133+
134+
assert.deepEqual(info, { args: ['add', '--dev', 'black', '--allow-prereleases'], execPath: 'poetry path' });
135+
});
125136
});

0 commit comments

Comments
 (0)