show 10 slowest cases

This commit is contained in:
Frost Ming
2021-08-02 12:44:59 +08:00
parent cb869897b1
commit 443547fee5
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ steps:
# Fix Git SSL errors
echo "Using pipenv python version: $(PIPENV_DEFAULT_PYTHON_VERSION)"
git submodule sync && git submodule update --init --recursive
pipenv run pytest -v -n auto --junitxml=junit/test-results.xml tests
pipenv run pytest -v -n auto --durations=10 --junitxml=junit/test-results.xml tests
displayName: Run integration tests
env:
PYTHONWARNINGS: ignore:DEPRECATION
+1 -1
View File
@@ -47,7 +47,7 @@ steps:
git submodule sync
git submodule update --init --recursive
$venv = (pipenv --venv)[0]
& $venv/Scripts/pytest.exe -ra -n auto -v --junit-xml=junit/test-results.xml tests/
& $venv/Scripts/pytest.exe -ra -n auto -v --durations=10 --junit-xml=junit/test-results.xml tests/
failOnStderr: false
displayName: Run integration tests
env:
+3 -2
View File
@@ -1,4 +1,5 @@
import errno
import functools
import json
import logging
import os
@@ -449,7 +450,7 @@ def pip_src_dir(request, vistir_tmpdir):
@pytest.fixture()
def PipenvInstance(pip_src_dir, monkeypatch, pypi):
def PipenvInstance(pip_src_dir, monkeypatch, pypi, tmp_path):
with temp_environ(), monkeypatch.context() as m:
m.setattr(shutil, "rmtree", _rmtree_func)
original_umask = os.umask(0o007)
@@ -463,7 +464,7 @@ def PipenvInstance(pip_src_dir, monkeypatch, pypi):
warnings.simplefilter("ignore", category=ResourceWarning)
warnings.filterwarnings("ignore", category=ResourceWarning, message="unclosed.*<ssl.SSLSocket.*>")
try:
yield _PipenvInstance
yield functools.partial(_PipenvInstance, path=tmp_path, pypi=pypi)
finally:
os.umask(original_umask)
+1 -1
View File
@@ -193,4 +193,4 @@ def test_uninstall_missing_parameters(PipenvInstance):
c = p.pipenv("uninstall")
assert c.returncode != 0
assert "No package provided!" in c.stderr
assert "No package provided!" in str(c.exception)