Skip to content

Commit 6d2e428

Browse files
Copilotanthonykim1
andcommitted
Consolidate conditionals for test command detection
Co-authored-by: anthonykim1 <62267334+anthonykim1@users.noreply.github.com>
1 parent 8ed74f2 commit 6d2e428

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/client/terminals/codeExecution/terminalReplWatcher.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ function checkREPLCommand(command: string): undefined | 'manualTerminal' | `runn
99
// Check for test commands
1010
if (
1111
lower.includes('pytest') ||
12-
(lower.startsWith('python') && lower.includes(' -m pytest')) ||
13-
(lower.startsWith('py ') && lower.includes(' -m pytest')) ||
14-
(lower.startsWith('python') && lower.includes(' -m unittest')) ||
15-
(lower.startsWith('py ') && lower.includes(' -m unittest')) ||
12+
(lower.startsWith('python') && (lower.includes(' -m pytest') || lower.includes(' -m unittest'))) ||
13+
(lower.startsWith('py ') && (lower.includes(' -m pytest') || lower.includes(' -m unittest'))) ||
1614
lower.includes('py.test')
1715
) {
1816
return 'runningTest';

0 commit comments

Comments
 (0)