Ai
1 Star 0 Fork 0

joyni/vscode-python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
__main__.py 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import argparse
import sys
import pytest
from . import DEBUG_ADAPTER_ROOT, IPYTHON_ROOT, SRC_ROOT, TEST_ROOT, TESTING_TOOLS_ROOT
def parse_args():
parser = argparse.ArgumentParser()
# To mark a test as functional: (decorator) @pytest.mark.functional
parser.add_argument(
"--functional", dest="markers", action="append_const", const="functional"
)
parser.add_argument(
"--no-functional", dest="markers", action="append_const", const="not functional"
)
args, remainder = parser.parse_known_args()
ns = vars(args)
return ns, remainder
def main(pytestargs, markers=None):
sys.path.insert(1, IPYTHON_ROOT)
sys.path.insert(1, TESTING_TOOLS_ROOT)
sys.path.insert(1, DEBUG_ADAPTER_ROOT)
pytestargs = ["--rootdir", SRC_ROOT, TEST_ROOT] + pytestargs
for marker in reversed(markers or ()):
pytestargs.insert(0, marker)
pytestargs.insert(0, "-m")
ec = pytest.main(pytestargs)
return ec
if __name__ == "__main__":
mainkwargs, pytestargs = parse_args()
ec = main(pytestargs, **mainkwargs)
sys.exit(ec)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luluunusually/vscode-python.git
git@gitee.com:luluunusually/vscode-python.git
luluunusually
vscode-python
vscode-python
master

搜索帮助