Skip to content

Commit 663b1ce

Browse files
committed
formatting p2
1 parent 9544332 commit 663b1ce

File tree

1 file changed

+9
-6
lines changed
  • src/client/testing/testController/common

1 file changed

+9
-6
lines changed

src/client/testing/testController/common/utils.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,21 +180,24 @@ export async function startDiscoveryNamedPipe(
180180
* @returns True if the error indicates pytest is not installed
181181
*/
182182
function isPytestNotInstalledError(message: string): boolean {
183-
return message.includes('ModuleNotFoundError') && message.includes('pytest') ||
184-
message.includes('No module named') && message.includes('pytest') ||
185-
message.includes('ImportError') && message.includes('pytest');
183+
return (
184+
(message.includes('ModuleNotFoundError') && message.includes('pytest')) ||
185+
(message.includes('No module named') && message.includes('pytest')) ||
186+
(message.includes('ImportError') && message.includes('pytest'))
187+
);
186188
}
187189

188190
export function buildErrorNodeOptions(uri: Uri, message: string, testType: string): ErrorTestItemOptions {
189191
let labelText = testType === 'pytest' ? 'pytest Discovery Error' : 'Unittest Discovery Error';
190192
let errorMessage = message;
191-
193+
192194
// Provide more specific error message if pytest is not installed
193195
if (testType === 'pytest' && isPytestNotInstalledError(message)) {
194196
labelText = 'pytest Not Installed';
195-
errorMessage = 'pytest is not installed in the selected Python environment. Please install pytest to enable test discovery and execution.';
197+
errorMessage =
198+
'pytest is not installed in the selected Python environment. Please install pytest to enable test discovery and execution.';
196199
}
197-
200+
198201
return {
199202
id: `DiscoveryError:${uri.fsPath}`,
200203
label: `${labelText} [${path.basename(uri.fsPath)}]`,

0 commit comments

Comments
 (0)