Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
tomasr8 and AA-Turner authored Aug 21, 2023
1 parent eb7f488 commit 7428393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/test/test_tools/test_i18n/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def assert_POT_equal(self, expected, actual):
expected = re.sub(date_pattern, header, expected)
actual = re.sub(date_pattern, header, actual)

# Normalize charset (currently there's no way to specify the output charset)
# Normalize charset to UTF-8 (currently there's no way to specify the output charset)
charset_pattern = re.compile(r'"Content-Type: text/plain; charset=.+?\n"')
charset = "Content-Type: text/plain; charset=UTF-8\\n"
expected = re.sub(charset_pattern, charset, expected)
actual = re.sub(charset_pattern, charset, actual)

# Normalize the file location path separators in case this test is
# running on a platform which does not use '/' as a default separator
# running on Windows (which uses '\')
fileloc_pattern = re.compile(r'#:.+')

def replace(match):
Expand Down Expand Up @@ -349,7 +349,7 @@ def test_pygettext_output(self):
contents = (data_dir / input_file).read_text(encoding='utf-8')
with temp_cwd(None):
Path(input_file).write_text(contents)
assert_python_ok(self.script, '-D', input_file)
assert_python_ok(self.script, '--docstrings', input_file)
output = Path('messages.pot').read_text()

expected = (data_dir / output_file).read_text(encoding='utf-8')
Expand Down

0 comments on commit 7428393

Please sign in to comment.