Skip to content

Commit 225ff12

Browse files
committed
remove unittest refs
1 parent 4e7a325 commit 225ff12

File tree

3 files changed

+7
-109
lines changed

3 files changed

+7
-109
lines changed

.vscode/settings.json

Lines changed: 7 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"source.fixAll.eslint": "explicit",
2929
"source.organizeImports.isort": "explicit"
3030
},
31-
"editor.defaultFormatter": "charliermarsh.ruff"
31+
"editor.defaultFormatter": "charliermarsh.ruff",
3232
},
3333
"[rust]": {
3434
"editor.defaultFormatter": "rust-lang.rust-analyzer",
@@ -67,106 +67,12 @@
6767
"git.pullBeforeCheckout": true,
6868
// Open merge editor for resolving conflicts.
6969
"git.mergeEditor": true,
70-
"python.testing.pytestArgs": ["python_files/tests"],
70+
"python.testing.pytestArgs": [
71+
"python_files/tests"
72+
],
7173
"python.testing.unittestEnabled": false,
7274
"python.testing.pytestEnabled": true,
73-
"rust-analyzer.linkedProjects": [".\\python-env-tools\\Cargo.toml"],
74-
"chat.tools.terminal.autoApprove": {
75-
"cd": true,
76-
"echo": true,
77-
"ls": true,
78-
"pwd": true,
79-
"cat": true,
80-
"head": true,
81-
"tail": true,
82-
"findstr": true,
83-
"wc": true,
84-
"tr": true,
85-
"cut": true,
86-
"cmp": true,
87-
"which": true,
88-
"basename": true,
89-
"dirname": true,
90-
"realpath": true,
91-
"readlink": true,
92-
"stat": true,
93-
"file": true,
94-
"du": true,
95-
"df": true,
96-
"sleep": true,
97-
"nl": true,
98-
"grep": true,
99-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+status\\b/": true,
100-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+log\\b/": true,
101-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+show\\b/": true,
102-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+diff\\b/": true,
103-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+ls-files\\b/": true,
104-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+grep\\b/": true,
105-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+branch\\b/": true,
106-
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+branch\\b.*-(d|D|m|M|-delete|-force)\\b/": false,
107-
"Get-ChildItem": true,
108-
"Get-Content": true,
109-
"Get-Date": true,
110-
"Get-Random": true,
111-
"Get-Location": true,
112-
"Write-Host": true,
113-
"Write-Output": true,
114-
"Out-String": true,
115-
"Split-Path": true,
116-
"Join-Path": true,
117-
"Start-Sleep": true,
118-
"Where-Object": true,
119-
"/^Select-[a-z0-9]/i": true,
120-
"/^Measure-[a-z0-9]/i": true,
121-
"/^Compare-[a-z0-9]/i": true,
122-
"/^Format-[a-z0-9]/i": true,
123-
"/^Sort-[a-z0-9]/i": true,
124-
"column": true,
125-
"/^column\\b.*-c\\s+[0-9]{4,}/": false,
126-
"date": true,
127-
"/^date\\b.*(-s|--set)\\b/": false,
128-
"find": true,
129-
"/^find\\b.*-(delete|exec|execdir|fprint|fprintf|fls|ok|okdir)\\b/": false,
130-
"rg": true,
131-
"/^rg\\b.*(--pre|--hostname-bin)\\b/": false,
132-
"sed": true,
133-
"/^sed\\b.*(-[a-zA-Z]*(e|i|I|f)[a-zA-Z]*|--expression|--file|--in-place)\\b/": false,
134-
"/^sed\\b.*(/e|/w|;W)/": false,
135-
"sort": true,
136-
"/^sort\\b.*-(o|S)\\b/": false,
137-
"tree": true,
138-
"/^tree\\b.*-o\\b/": false,
139-
"rm": false,
140-
"rmdir": false,
141-
"del": false,
142-
"Remove-Item": false,
143-
"ri": false,
144-
"rd": false,
145-
"erase": false,
146-
"dd": false,
147-
"kill": false,
148-
"ps": false,
149-
"top": false,
150-
"Stop-Process": false,
151-
"spps": false,
152-
"taskkill": false,
153-
"taskkill.exe": false,
154-
"curl": false,
155-
"wget": false,
156-
"Invoke-RestMethod": false,
157-
"Invoke-WebRequest": false,
158-
"irm": false,
159-
"iwr": false,
160-
"chmod": false,
161-
"chown": false,
162-
"Set-ItemProperty": false,
163-
"sp": false,
164-
"Set-Acl": false,
165-
"jq": false,
166-
"xargs": false,
167-
"eval": false,
168-
"Invoke-Expression": false,
169-
"iex": false,
170-
"npx tsc": true
171-
}
75+
"rust-analyzer.linkedProjects": [
76+
".\\python-env-tools\\Cargo.toml"
77+
]
17278
}

python_files/unittestadapter/pvsc_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ def build_test_tree(
251251
# Find/build file node.
252252
path_components = [top_level_directory, *folders, py_filename]
253253
file_path = os.fsdecode(pathlib.PurePath("/".join(path_components)))
254-
255254
current_node = get_child_node(
256255
py_filename, file_path, TestNodeTypeEnum.file, current_node
257256
)

src/client/testing/testController/unittest/testDiscoveryAdapter.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { PythonEnvironment } from '../../../pythonEnvironments/info';
1818
import { createTestingDeferred } from '../common/utils';
1919
import { buildDiscoveryCommand, buildUnittestEnv as configureSubprocessEnv } from './unittestHelpers';
2020
import { cleanupOnCancellation, createProcessHandlers, setupDiscoveryPipe } from '../common/discoveryHelpers';
21-
import { ProjectAdapter } from '../common/projectAdapter';
2221

2322
/**
2423
* Configures the subprocess environment for unittest discovery.
@@ -52,7 +51,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
5251
executionFactory: IPythonExecutionFactory,
5352
token?: CancellationToken,
5453
interpreter?: PythonEnvironment,
55-
project?: ProjectAdapter,
5654
): Promise<void> {
5755
// Setup discovery pipe and cancellation
5856
const {
@@ -80,11 +78,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
8078
// Configure subprocess environment
8179
const mutableEnv = await configureDiscoveryEnv(this.envVarsService, uri, discoveryPipeName);
8280

83-
// Set PROJECT_ROOT_PATH for project-based testing (tells Python where to root the test tree)
84-
if (project) {
85-
mutableEnv.PROJECT_ROOT_PATH = project.projectUri.fsPath;
86-
}
87-
8881
// Setup process handlers (shared by both execution paths)
8982
const handlers = createProcessHandlers('unittest', uri, cwd, this.resultResolver, deferredTillExecClose);
9083

0 commit comments

Comments
 (0)