Skip to content

Commit ab02d21

Browse files
committed
Windows fix
1 parent a354d19 commit ab02d21

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Lib/test/test_tools/test_i18n.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,14 +572,16 @@ def test_multiple_keywords_same_funcname_errors(self):
572572
'''), args=('--keyword=_:1', '--keyword=_:2'), with_stderr=True,
573573
strict=False)
574574
self.assertEqual(msgids, [''])
575+
# Normalize line endings on Windows
576+
stderr = stderr.decode('utf-8').replace('\r', '')
575577
self.assertEqual(
576578
stderr,
577-
b'*** test.py:1: No keywords matched gettext call "_":\n'
578-
b'\tkeyword="_": Expected a string constant for argument 1, got x\n'
579-
b'\tkeyword="_:2": Expected a string constant for argument 2, got 42\n'
580-
b'*** test.py:2: No keywords matched gettext call "_":\n'
581-
b'\tkeyword="_": Expected a string constant for argument 1, got 42\n'
582-
b'\tkeyword="_:2": Expected a string constant for argument 2, got y\n')
579+
'*** test.py:1: No keywords matched gettext call "_":\n'
580+
'\tkeyword="_": Expected a string constant for argument 1, got x\n'
581+
'\tkeyword="_:2": Expected a string constant for argument 2, got 42\n'
582+
'*** test.py:2: No keywords matched gettext call "_":\n'
583+
'\tkeyword="_": Expected a string constant for argument 1, got 42\n'
584+
'\tkeyword="_:2": Expected a string constant for argument 2, got y\n')
583585

584586

585587
def extract_from_snapshots():

0 commit comments

Comments
 (0)