You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.9 KiB
53 lines
1.9 KiB
5 years ago
|
From f9f51984e14d5d970950d10a8edff5f000196949 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||
|
Date: Tue, 2 Jun 2020 19:27:53 +0200
|
||
|
Subject: [PATCH] Allow both pre- and post- PEP 610 outputs in
|
||
|
test_venv_special_chars_issue252
|
||
|
|
||
|
pip 20.1+ supports PEP 610 https://www.python.org/dev/peps/pep-0610/
|
||
|
Hence the output is changed a bit.
|
||
|
This was acknowledged in 553d6f282119481cbd4cf2a78e633eb8b506659e.
|
||
|
|
||
|
Here we allow to run the tests with pip 19.3.x again
|
||
|
by relaxing the regex to match both the old and the new format.
|
||
|
---
|
||
|
docs/changelog/1594.misc.rst | 1 +
|
||
|
tests/unit/test_z_cmdline.py | 2 +-
|
||
|
tox.ini | 2 +-
|
||
|
3 files changed, 3 insertions(+), 2 deletions(-)
|
||
|
create mode 100644 docs/changelog/1594.misc.rst
|
||
|
|
||
|
diff --git a/docs/changelog/1594.misc.rst b/docs/changelog/1594.misc.rst
|
||
|
new file mode 100644
|
||
|
index 000000000..f945be2e2
|
||
|
--- /dev/null
|
||
|
+++ b/docs/changelog/1594.misc.rst
|
||
|
@@ -0,0 +1 @@
|
||
|
+Allow to run the tests with pip 19.3.1 once again while preserving the ability to use pip 20.1 - by :user:`hroncok`
|
||
|
diff --git a/tests/unit/test_z_cmdline.py b/tests/unit/test_z_cmdline.py
|
||
|
index 291ef4463..7f3b816d8 100644
|
||
|
--- a/tests/unit/test_z_cmdline.py
|
||
|
+++ b/tests/unit/test_z_cmdline.py
|
||
|
@@ -337,7 +337,7 @@ def test_venv_special_chars_issue252(cmd, initproj):
|
||
|
)
|
||
|
result = cmd()
|
||
|
result.assert_success()
|
||
|
- pattern = re.compile("special&&1 installed: .*pkg123 @ .*-0.7.zip.*")
|
||
|
+ pattern = re.compile(r"special&&1 installed: .*pkg123( @ .*-|==)0\.7(\.zip)?.*")
|
||
|
assert any(pattern.match(line) for line in result.outlines), "\n".join(result.outlines)
|
||
|
|
||
|
|
||
|
diff --git a/tox.ini b/tox.ini
|
||
|
index 723bd788a..4e2420c4a 100644
|
||
|
--- a/tox.ini
|
||
|
+++ b/tox.ini
|
||
|
@@ -31,7 +31,7 @@ passenv =
|
||
|
PYTEST_*
|
||
|
PIP_CACHE_DIR
|
||
|
deps =
|
||
|
- pip >= 20.1
|
||
|
+ pip >= 19.3.1
|
||
|
extras = testing
|
||
|
commands = pytest \
|
||
|
--cov "{envsitepackagesdir}/tox" \
|