summarylogtreecommitdiffstats
path: root/skip-unsupported-test.patch
blob: ed05d82f26b782e382e068c303e99b9f4e2ca61a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 304fbd6fea63888ad1033d8e87a5649246d53336 Mon Sep 17 00:00:00 2001
From: Claudia <claui@users.noreply.github.com>
Date: Mon, 29 May 2023 19:21:16 +0200
Subject: [PATCH] Mark failing test (irrelevant on Arch Linux)

Part of the `test_parse_requirements_PEP508` test covers a feature
called *legacy version* that requires a version of setuptools older than
66.

Newer versions of setuptools no longer support legacy versions [1],
which defeats the purpose of the feature and makes this test entirely
obsolete for Arch Linux.

Mark the affected test instance as `xfail` to work around that.

[1]: https://github.com/pypa/setuptools/issues/2497
---
 tests/test_parse_requirements.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/test_parse_requirements.py b/tests/test_parse_requirements.py
index fc4484d..c0384a9 100644
--- a/tests/test_parse_requirements.py
+++ b/tests/test_parse_requirements.py
@@ -74,13 +74,16 @@ PEP508_PIP_EXAMPLE_WHEEL_FILE = "file://tmp/pip-1.3.1-py2.py3-none-any.whl"
             "pip@ " + PEP508_PIP_EXAMPLE_URL,  # Note extra space after @
             "",
         ),
-        (
+        pytest.param(
             # Version and URL can't be combined so this all gets parsed as a legacy version
             "pip==1.3.1@{url}\n".format(url=PEP508_PIP_EXAMPLE_URL),
             {"pip"},
             None,
             "pip==1.3.1@" + PEP508_PIP_EXAMPLE_URL,  # Note no extra space after @
             "==1.3.1@" + PEP508_PIP_EXAMPLE_URL,
+            marks=pytest.mark.xfail(
+                reason="setuptools v66+ no longer supports legacy versions"
+            ),
         ),
         (
             # VCS markers at the beginning of a URL get stripped away
-- 
2.43.0