From f31725f5271ea933f8bb6b0cb1cd361d804247d4 Mon Sep 17 00:00:00 2001 From: sharktide Date: Thu, 8 May 2025 18:05:47 -0400 Subject: [PATCH 1/2] Do not run test_table_output_format if system encoding is not UTF8 --- Lib/test/test_asyncio/test_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_asyncio/test_tools.py b/Lib/test/test_asyncio/test_tools.py index 0413e236c27dfa..1140eefa075251 100644 --- a/Lib/test/test_asyncio/test_tools.py +++ b/Lib/test/test_asyncio/test_tools.py @@ -771,6 +771,7 @@ def test_multiple_cycles_same_node(self): cycles = ctx.exception.cycles self.assertTrue(any(set(c) == {1, 2, 3} for c in cycles)) + @unittest.skipIf(locale.getpreferredencoding().lower() != 'utf-8', 'test requires utf-8') def test_table_output_format(self): input_ = [(1, [(1, "Task-A", [[["foo"], 2]]), (2, "Task-B", [])])] table = tools.build_task_table(input_) From eca6aa0afe5a8446c450a22b9e38d7ec37597a7b Mon Sep 17 00:00:00 2001 From: sharktide Date: Thu, 8 May 2025 18:10:33 -0400 Subject: [PATCH 2/2] Add import statements --- Lib/test/test_asyncio/test_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_asyncio/test_tools.py b/Lib/test/test_asyncio/test_tools.py index 1140eefa075251..c61c29ccdc0ab9 100644 --- a/Lib/test/test_asyncio/test_tools.py +++ b/Lib/test/test_asyncio/test_tools.py @@ -1,7 +1,7 @@ import unittest from asyncio import tools - +import locale # mock output of get_all_awaited_by function. TEST_INPUTS_TREE = [