Skip to content

Commit c4e26d3

Browse files
agnersclaude
andcommitted
[3.13] gh-159015: Fix test_math import on musl
The 3.13 backport of gh-152563 compares the return value of support.linked_to_musl() with a version tuple, but on 3.13 the helper still returns a bool. On musl this raises TypeError at class definition time, so test_math and test_cmath fail to import. Restore the previous skip condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 15e701a commit c4e26d3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎Lib/test/test_math.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2743,7 +2743,7 @@ def test_fma_infinities(self):
27432743
@unittest.skipIf(
27442744
sys.platform.startswith(("freebsd", "wasi", "netbsd", "emscripten"))
27452745
or (sys.platform == "android" and platform.machine() == "x86_64")
2746-
or (support.linked_to_musl() and support.linked_to_musl() < (1, 2, 6)), # gh-131032
2746+
or support.linked_to_musl(), # gh-131032
27472747
f"this platform doesn't implement IEE 754-2008 properly")
27482748
def test_fma_zero_result(self):
27492749
nonnegative_finites = [0.0, 1e-300, 2.3, 1e300]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix :mod:`!test.test_math` failing to import on musl-based systems. The
2+
skip condition of ``test_fma_zero_result`` compared the boolean returned by
3+
:func:`!test.support.linked_to_musl` with a version tuple.

0 commit comments

Comments
 (0)