|
1 | | -From 24e0dd64b30f81e8bb8266c17243d79235d1a3c6 Mon Sep 17 00:00:00 2001 |
2 | | -From: Marc Mueller <[email protected]> |
3 | | -Date: Fri, 11 Oct 2024 20:11:47 +0200 |
4 | | -Subject: [PATCH] Skip failing tests on musl |
| 1 | +From c4355fe059aad95122cae9747ec9e34b934a2a3a Mon Sep 17 00:00:00 2001 |
| 2 | +From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <[email protected]> |
| 3 | +Date: Fri, 11 Apr 2025 13:20:37 +0200 |
| 4 | +Subject: [PATCH] Skip test_re tests failing on musl |
5 | 5 |
|
6 | 6 | --- |
7 | | - Lib/test/support/__init__.py | 1 + |
8 | | - Lib/test/test_math.py | 4 ++-- |
9 | | - Lib/test/test_re.py | 6 +++--- |
10 | | - 3 files changed, 6 insertions(+), 5 deletions(-) |
| 7 | + Lib/test/test_re.py | 6 +++--- |
| 8 | + 1 file changed, 3 insertions(+), 3 deletions(-) |
11 | 9 |
|
12 | | -diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py |
13 | | -index 7938b46012c..318fd3f8381 100644 |
14 | | ---- a/Lib/test/support/__init__.py |
15 | | -+++ b/Lib/test/support/__init__.py |
16 | | -@@ -555,6 +555,7 @@ def skip_if_suppress_immortalization(): |
17 | | - # have subprocess or fork support. |
18 | | - is_emscripten = sys.platform == "emscripten" |
19 | | - is_wasi = sys.platform == "wasi" |
20 | | -+is_musl = sys.platform = "linux" |
21 | | - |
22 | | - is_apple_mobile = sys.platform in {"ios", "tvos", "watchos"} |
23 | | - is_apple = is_apple_mobile or sys.platform == "darwin" |
24 | | -diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py |
25 | | -index 96ec55a09b0..401ab70cf2a 100644 |
26 | | ---- a/Lib/test/test_math.py |
27 | | -+++ b/Lib/test/test_math.py |
28 | | -@@ -1,7 +1,7 @@ |
29 | | - # Python test set -- math module |
30 | | - # XXXX Should not do tests around zero only |
31 | | - |
32 | | --from test.support import verbose, requires_IEEE_754 |
33 | | -+from test.support import is_musl, verbose, requires_IEEE_754 |
34 | | - from test import support |
35 | | - import unittest |
36 | | - import fractions |
37 | | -@@ -2706,7 +2706,7 @@ def test_fma_infinities(self): |
38 | | - # gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008 |
39 | | - # properly: it doesn't use the right sign when the result is zero. |
40 | | - @unittest.skipIf( |
41 | | -- sys.platform.startswith(("freebsd", "wasi", "netbsd")) |
42 | | -+ sys.platform.startswith(("freebsd", "wasi", "netbsd")) or is_musl |
43 | | - or (sys.platform == "android" and platform.machine() == "x86_64"), |
44 | | - f"this platform doesn't implement IEE 754-2008 properly") |
45 | | - def test_fma_zero_result(self): |
46 | 10 | diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py |
47 | | -index 813cb4a3f54..19713539fae 100644 |
| 11 | +index 813cb4a..0b5877a 100644 |
48 | 12 | --- a/Lib/test/test_re.py |
49 | 13 | +++ b/Lib/test/test_re.py |
50 | 14 | @@ -1,6 +1,6 @@ |
51 | 15 | from test.support import (gc_collect, bigmemtest, _2G, |
52 | 16 | cpython_only, captured_stdout, |
53 | 17 | - check_disallow_instantiation, is_emscripten, is_wasi, |
54 | | -+ check_disallow_instantiation, is_emscripten, is_musl, is_wasi, |
| 18 | ++ check_disallow_instantiation, is_emscripten, is_wasi, linked_to_musl, |
55 | 19 | warnings_helper, SHORT_TIMEOUT, CPUStopwatch, requires_resource) |
56 | 20 | import locale |
57 | 21 | import re |
58 | | -@@ -2177,7 +2177,7 @@ def test_bug_20998(self): |
| 22 | +@@ -2177,7 +2177,7 @@ class ReTests(unittest.TestCase): |
59 | 23 | self.assertEqual(re.fullmatch('[a-c]+', 'ABC', re.I).span(), (0, 3)) |
60 | 24 |
|
61 | 25 | @unittest.skipIf( |
62 | 26 | - is_emscripten or is_wasi, |
63 | | -+ is_emscripten or is_wasi or is_musl, |
| 27 | ++ is_emscripten or is_wasi or linked_to_musl, |
64 | 28 | "musl libc issue on Emscripten/WASI, bpo-46390" |
65 | 29 | ) |
66 | 30 | def test_locale_caching(self): |
67 | | -@@ -2217,7 +2217,7 @@ def check_en_US_utf8(self): |
| 31 | +@@ -2217,7 +2217,7 @@ class ReTests(unittest.TestCase): |
68 | 32 | self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5')) |
69 | 33 |
|
70 | 34 | @unittest.skipIf( |
71 | 35 | - is_emscripten or is_wasi, |
72 | | -+ is_emscripten or is_wasi or is_musl, |
| 36 | ++ is_emscripten or is_wasi or linked_to_musl, |
73 | 37 | "musl libc issue on Emscripten/WASI, bpo-46390" |
74 | 38 | ) |
75 | 39 | def test_locale_compiled(self): |
76 | | --- |
77 | | -2.47.1 |
78 | | - |
0 commit comments