177 lines
7.9 KiB
Diff
177 lines
7.9 KiB
Diff
diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py
|
|
index 606dd29..087a437 100644
|
|
--- a/Lib/test/test__locale.py
|
|
+++ b/Lib/test/test__locale.py
|
|
@@ -138,7 +138,7 @@ class _LocaleTests(unittest.TestCase):
|
|
|
|
@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
|
|
@unittest.skipIf(
|
|
- support.is_emscripten or support.is_wasi,
|
|
+ support.is_emscripten or support.is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_lc_numeric_nl_langinfo(self):
|
|
@@ -158,7 +158,7 @@ class _LocaleTests(unittest.TestCase):
|
|
self.skipTest('no suitable locales')
|
|
|
|
@unittest.skipIf(
|
|
- support.is_emscripten or support.is_wasi,
|
|
+ support.is_emscripten or support.is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_lc_numeric_localeconv(self):
|
|
@@ -208,7 +208,7 @@ class _LocaleTests(unittest.TestCase):
|
|
@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
|
|
@unittest.skipUnless(hasattr(locale, 'ALT_DIGITS'), "requires locale.ALT_DIGITS")
|
|
@unittest.skipIf(
|
|
- support.is_emscripten or support.is_wasi,
|
|
+ support.is_emscripten or support.is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_alt_digits_nl_langinfo(self):
|
|
@@ -244,7 +244,7 @@ class _LocaleTests(unittest.TestCase):
|
|
@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
|
|
@unittest.skipUnless(hasattr(locale, 'ERA'), "requires locale.ERA")
|
|
@unittest.skipIf(
|
|
- support.is_emscripten or support.is_wasi,
|
|
+ support.is_emscripten or support.is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_era_nl_langinfo(self):
|
|
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
|
|
index cde80a4..dc07239 100644
|
|
--- a/Lib/test/test_locale.py
|
|
+++ b/Lib/test/test_locale.py
|
|
@@ -350,7 +350,7 @@ class TestEnUSCollation(BaseLocalizedTest, TestCollation):
|
|
@unittest.skipIf(sys.platform.startswith('aix'),
|
|
'bpo-29972: broken test on AIX')
|
|
@unittest.skipIf(
|
|
- is_emscripten or is_wasi,
|
|
+ is_emscripten or is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten/WASI, bpo-46390"
|
|
)
|
|
@unittest.skipIf(sys.platform.startswith("netbsd"),
|
|
@@ -361,7 +361,7 @@ class TestEnUSCollation(BaseLocalizedTest, TestCollation):
|
|
@unittest.skipIf(sys.platform.startswith('aix'),
|
|
'bpo-29972: broken test on AIX')
|
|
@unittest.skipIf(
|
|
- is_emscripten or is_wasi,
|
|
+ is_emscripten or is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten/WASI, bpo-46390"
|
|
)
|
|
@unittest.skipIf(sys.platform.startswith("netbsd"),
|
|
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
|
|
index 1d6d92e..7fdd519 100644
|
|
--- a/Lib/test/test_os.py
|
|
+++ b/Lib/test/test_os.py
|
|
@@ -2369,7 +2369,7 @@ class TestInvalidFD(unittest.TestCase):
|
|
|
|
@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')
|
|
@unittest.skipIf(
|
|
- support.is_emscripten or support.is_wasi,
|
|
+ support.is_emscripten or support.is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten/WASI, bpo-46390"
|
|
)
|
|
def test_fpathconf(self):
|
|
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
|
|
index fbab495..f0ef54e 100644
|
|
--- a/Lib/test/test_re.py
|
|
+++ b/Lib/test/test_re.py
|
|
@@ -2112,7 +2112,7 @@ class ReTests(unittest.TestCase):
|
|
self.assertEqual(re.fullmatch('[a-c]+', 'ABC', re.I).span(), (0, 3))
|
|
|
|
@unittest.skipIf(
|
|
- is_emscripten or is_wasi,
|
|
+ is_emscripten or is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten/WASI, bpo-46390"
|
|
)
|
|
def test_locale_caching(self):
|
|
@@ -2152,7 +2152,7 @@ class ReTests(unittest.TestCase):
|
|
self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5'))
|
|
|
|
@unittest.skipIf(
|
|
- is_emscripten or is_wasi,
|
|
+ is_emscripten or is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten/WASI, bpo-46390"
|
|
)
|
|
def test_locale_compiled(self):
|
|
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
|
|
index 94b1663..f56d116 100644
|
|
--- a/Lib/test/test_strptime.py
|
|
+++ b/Lib/test/test_strptime.py
|
|
@@ -79,7 +79,7 @@ class LocaleTime_Tests(unittest.TestCase):
|
|
"AM/PM representation in the wrong position within the tuple")
|
|
|
|
@unittest.skipIf(
|
|
- support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"
|
|
+ support.is_emscripten or platform.libc_ver()[0] != 'glibc', "musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_timezone(self):
|
|
# Make sure timezone is correct
|
|
@@ -430,7 +430,7 @@ class StrptimeTests(unittest.TestCase):
|
|
|
|
@skip_if_buggy_ucrt_strfptime
|
|
@unittest.skipIf(
|
|
- support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"
|
|
+ support.is_emscripten or platform.libc_ver()[0] != 'glibc', "musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_timezone(self):
|
|
# Test timezone directives.
|
|
@@ -549,7 +549,7 @@ class StrptimeTests(unittest.TestCase):
|
|
|
|
# NB: Dates before 1969 do not roundtrip on many locales, including C.
|
|
@unittest.skipIf(
|
|
- support.is_emscripten or support.is_wasi,
|
|
+ support.is_emscripten or support.is_wasi or platform.libc_ver()[0] != 'glibc',
|
|
"musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
@run_with_locales('LC_TIME', 'en_US', 'fr_FR', 'de_DE', 'ja_JP',
|
|
diff --git a/Lib/test/test_threadsignals.py b/Lib/test/test_threadsignals.py
|
|
index bf241ad..71bd5e6 100644
|
|
--- a/Lib/test/test_threadsignals.py
|
|
+++ b/Lib/test/test_threadsignals.py
|
|
@@ -70,8 +70,8 @@ class ThreadSignals(unittest.TestCase):
|
|
|
|
@unittest.skipIf(USING_PTHREAD_COND,
|
|
'POSIX condition variables cannot be interrupted')
|
|
- @unittest.skipIf(sys.platform.startswith('linux') and
|
|
- not sys.thread_info.version,
|
|
+ @unittest.skipIf(sys.platform.startswith('linux')
|
|
+ or platform.libc_ver()[0] != 'glibc',
|
|
'Issue 34004: musl does not allow interruption of locks '
|
|
'by signals.')
|
|
# Issue #20564: sem_timedwait() cannot be interrupted on OpenBSD
|
|
@@ -101,8 +101,8 @@ class ThreadSignals(unittest.TestCase):
|
|
|
|
@unittest.skipIf(USING_PTHREAD_COND,
|
|
'POSIX condition variables cannot be interrupted')
|
|
- @unittest.skipIf(sys.platform.startswith('linux') and
|
|
- not sys.thread_info.version,
|
|
+ @unittest.skipIf(sys.platform.startswith('linux')
|
|
+ or platform.libc_ver()[0] != 'glibc',
|
|
'Issue 34004: musl does not allow interruption of locks '
|
|
'by signals.')
|
|
# Issue #20564: sem_timedwait() cannot be interrupted on OpenBSD
|
|
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
|
|
index 9ec51bd..7e3e40b 100644
|
|
--- a/Lib/test/test_time.py
|
|
+++ b/Lib/test/test_time.py
|
|
@@ -358,7 +358,7 @@ class TimeTestCase(unittest.TestCase):
|
|
self._bounds_checking(time.asctime)
|
|
|
|
@unittest.skipIf(
|
|
- support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"
|
|
+ support.is_emscripten or platform.libc_ver()[0] != 'glibc', "musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_ctime(self):
|
|
t = time.mktime((1973, 9, 16, 1, 3, 52, 0, 0, -1))
|
|
@@ -741,7 +741,7 @@ class TestPytime(unittest.TestCase):
|
|
@skip_if_buggy_ucrt_strfptime
|
|
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
|
|
@unittest.skipIf(
|
|
- support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"
|
|
+ support.is_emscripten or platform.libc_ver()[0] != 'glibc', "musl libc issue on Emscripten, bpo-46390"
|
|
)
|
|
def test_localtime_timezone(self):
|
|
|