Skip to content

Commit e90471d

Browse files
committed
the choices pytest that not allow unittest
1 parent fdc7361 commit e90471d

File tree

3 files changed

+53
-16
lines changed

3 files changed

+53
-16
lines changed

.vscode/launch.json

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,44 @@
44
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
// {
8+
// "args": [
9+
// "${file}",
10+
// // "1",
11+
// // "-l",
12+
// // "${workspaceFolder}/build/asc.txt",
13+
// // "-h",
14+
// ],
15+
// "console": "integratedTerminal",
16+
// "env": {
17+
// // "PYTEST_ADDOPTS": "--no-cov"
18+
// },
19+
// "module": "pytest",
20+
// "name": "Python: Pytest",
21+
// // "program": "${file}",
22+
// "request": "launch",
23+
// "type": "python",
24+
// },
725
{
8-
"name": "Python: The Current File",
9-
"type": "python",
10-
"request": "launch",
11-
"program": "${file}",
1226
// "args": [
13-
// "1",
14-
// "-l",
15-
// "${workspaceFolder}/build/asc.txt"
27+
// "-v",
28+
// "-s",
29+
// // "--disable-pytest-warnings",
1630
// ],
1731
"console": "integratedTerminal",
18-
"envFile": "${workspaceFolder}/.env/dev.env"
32+
// "debugOptions": [
33+
// "WaitOnAbnormalExit",
34+
// "WaitOnNormalExit",
35+
// "RedirectOutput"
36+
// ],
37+
"env": {
38+
// "PYTEST_ADDOPTS": "--no-cov"
39+
},
40+
"envFile": "${workspaceFolder}/.env/dev.env",
41+
"name": "Python: The Current File",
42+
"program": "${file}",
43+
"request": "launch",
44+
"type": "python",
1945
}
2046
]
2147
}

.vscode/settings.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,21 @@
8686
// "python.testing.autoTestDiscoverOnSaveEnabled": true,
8787
"python.testing.cwd": "${workspaceFolder}",
8888
"python.testing.nosetestsEnabled": false,
89-
"python.testing.pytestEnabled": false,
90-
"python.testing.unittestEnabled": true,
91-
// https://github.com/microsoft/vscode-python/discussions/15997#discussioncomment-636389
92-
"python.testing.unittestArgs": [
93-
"-v",
89+
"python.testing.pytestEnabled": true,
90+
"python.testing.pytestArgs": [
91+
// "--disable-pytest-warnings",
9492
"-s",
95-
".",
96-
"-p",
97-
"test_*.py"
93+
"-v",
9894
],
95+
"python.testing.unittestEnabled": false,
96+
// https://github.com/microsoft/vscode-python/discussions/15997#discussioncomment-636389
97+
// "python.testing.unittestArgs": [
98+
// "-v",
99+
// "-s",
100+
// ".",
101+
// "-p",
102+
// "test_*.py"
103+
// ],
99104
// "workbench.settings.openDefaultSettings": true,
100105
// "workbench.settings.editor": "ui",
101106
// "workbench.settings.openDefaultKeybindings": true,

case/argparse/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# -*- coding:utf-8 -*-
22

3+
import logging
34
import os
45
import shutil
56
import tempfile
7+
8+
from com.dvsnier.config.journal.common_config import config
69
import pytest
710

11+
kwargs = {'output_dir_name': 'pytest', 'file_name': 'log', 'level': logging.DEBUG}
12+
config(kwargs)
13+
814

915
@pytest.fixture(scope="session")
1016
def _temp_dir():

0 commit comments

Comments
 (0)