1 Star 0 Fork 0

Yan-NanJing/jupyterlab

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
conftest.py 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import pytest
pytest_plugins = [
"pytest_jupyter.jupyter_server",
"jupyterlab_server.pytest_plugin",
"jupyterlab.pytest_plugin",
]
def pytest_addoption(parser):
"""
Adds flags for pytest.
This is called by the pytest API
"""
group = parser.getgroup("general")
group.addoption("--quick", action="store_true", help="Skip slow tests")
group.addoption("--slow", action="store_true", help="Run only slow tests")
def pytest_configure(config):
config.addinivalue_line("markers", "slow: mark test as slow to run")
def pytest_collection_modifyitems(config, items):
if config.getoption("--quick"):
skip_slow = pytest.mark.skip(reason="skipping slow test")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)
elif config.getoption("--slow"):
skip_quick = pytest.mark.skip(reason="skipping non-slow test")
for item in items:
if "slow" not in item.keywords:
item.add_marker(skip_quick)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nanjingling/jupyterlab.git
git@gitee.com:nanjingling/jupyterlab.git
nanjingling
jupyterlab
jupyterlab
main

搜索帮助