mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
show 10 slowest cases
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user