( context: ExtensionContext, pythonEnv: PythonEnvironment, )
| 320 | } |
| 321 | |
| 322 | export function registerCodeLensCommands( |
| 323 | context: ExtensionContext, |
| 324 | pythonEnv: PythonEnvironment, |
| 325 | ): void { |
| 326 | context.subscriptions.push( |
| 327 | vscode.commands.registerCommand('pyrefly.runTest', async args => { |
| 328 | const parsedArgs = parseRunTestArgs(args); |
| 329 | if (!parsedArgs) { |
| 330 | return; |
| 331 | } |
| 332 | await runTestAtLocation(parsedArgs, pythonEnv); |
| 333 | }), |
| 334 | ); |
| 335 | |
| 336 | context.subscriptions.push( |
| 337 | vscode.commands.registerCommand('pyrefly.runMain', async args => { |
| 338 | const parsedArgs = parseRunMainArgs(args); |
| 339 | if (!parsedArgs) { |
| 340 | return; |
| 341 | } |
| 342 | await runMainFile(parsedArgs, pythonEnv); |
| 343 | }), |
| 344 | ); |
| 345 | } |
no test coverage detected