From 610896e816bcac8c3255ea0d50af6fa72c5c11c2 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Tue, 24 Dec 2024 18:15:31 +0900 Subject: [PATCH] fix --- Lib/test/test_str.py | 5 ++++- Lib/test/test_sys.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py index 4de6c1cba152bd..6178fed89bda5a 100644 --- a/Lib/test/test_str.py +++ b/Lib/test/test_str.py @@ -2449,7 +2449,10 @@ def test_expandtabs_optimization(self): self.assertIs(s.expandtabs(), s) def test_raiseMemError(self): - asciifields = "nnb" + if sys.platform == 'win32': + asciifields = "nnH" + else: + asciifields = "nnb" compactfields = asciifields + "nP" ascii_struct_size = support.calcobjsize(asciifields) compact_struct_size = support.calcobjsize(compactfields) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index d839893d2c657e..607ebe4fef3b65 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1762,7 +1762,10 @@ class newstyleclass(object): pass '\u0100'*40, '\uffff'*100, '\U00010000'*30, '\U0010ffff'*100] # also update field definitions in test_unicode.test_raiseMemError - asciifields = "nnb" + if sys.platform == 'win32': + asciifields = "nnH" + else: + asciifields = "nnb" compactfields = asciifields + "nP" unicodefields = compactfields + "P" for s in samples: