Skip to content

Commit

Permalink
Use REPO_ROOT and TEST_HOME_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Oct 27, 2024
1 parent 28ae5f2 commit 21c9aaf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Lib/test/test_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

from enum import StrEnum
from pathlib import Path
from test.support import REPO_ROOT
from test.support import TEST_HOME_DIR
from test.support import captured_stderr
from test.support import import_helper
from test.support import os_helper
Expand Down Expand Up @@ -7022,9 +7024,8 @@ def test_directory_in_zipfile_compiled(self):
# Translation tests
# =================

i18n_tools = Path(__file__).parents[2] / 'Tools' / 'i18n'
pygettext = i18n_tools / 'pygettext.py'
snapshot_path = Path(__file__).parent / 'translationdata' / 'argparse' / 'msgids.txt'
pygettext = Path(REPO_ROOT) / 'Tools' / 'i18n' / 'pygettext.py'
snapshot_path = Path(TEST_HOME_DIR) / 'translationdata' / 'argparse' / 'msgids.txt'

msgid_pattern = re.compile(r'msgid(.*?)(?:msgid_plural|msgctxt|msgstr)', re.DOTALL)
msgid_string_pattern = re.compile(r'"((?:\\"|[^"])*)"')
Expand Down

0 comments on commit 21c9aaf

Please sign in to comment.