From 0d3255cdae88e5476e9f36d76e18872f08fc593f Mon Sep 17 00:00:00 2001 From: Willem Jiang Date: Sat, 12 Jul 2025 13:27:47 +0800 Subject: [PATCH] feat: add the vscode unit test debug settings (#346) --- .vscode/launch.json | 30 ++++++++++++++++++++++++++++++ .vscode/settings.json | 7 +++++++ 2 files changed, 37 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json b/.vscode/launch.json index 18410e1..cfb0a95 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,36 @@ { "version": "0.2.0", "configurations": [ + + { + "name": "Debug Tests", + "type": "debugpy", + "request": "launch", + "module": "pytest", + "args": [ + "${workspaceFolder}/tests", + "-v", + "-s" + ], + "console": "integratedTerminal", + "justMyCode": false, + "env": { + "PYTHONPATH": "${workspaceFolder}" + } + }, + { + "name": "Debug Current Test File", + "type": "debugpy", + "request": "launch", + "module": "pytest", + "args": [ + "${file}", + "-v", + "-s" + ], + "console": "integratedTerminal", + "justMyCode": false + }, { "name": "Python: 当前文件", "type": "debugpy", diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9b38853 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.testing.pytestArgs": [ + "tests" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} \ No newline at end of file