Skip to content

Commit 6e0cd50

Browse files
committed
Simplify test
1 parent 6cc0833 commit 6e0cd50

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Lib/test/test_tools/test_i18n.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def assert_POT_equal(self, expected, actual):
8888
self.assertEqual(normalize_POT_file(expected), normalize_POT_file(actual))
8989

9090
def extract_from_str(self, module_content, *, args=(), strict=True):
91+
"""Return all msgids extracted from module_content."""
9192
filename = 'test.py'
9293
with temp_cwd(None):
9394
with open(filename, 'w', encoding='utf-8') as fp:
@@ -103,10 +104,6 @@ def extract_docstrings_from_str(self, module_content):
103104
"""Return all docstrings extracted from module_content."""
104105
return self.extract_from_str(module_content, args=('--docstrings',), strict=False)
105106

106-
def extract_messages_from_str(self, module_content):
107-
"""Return all msgids extracted from module_content."""
108-
return self.extract_from_str(module_content)
109-
110107
def test_header(self):
111108
"""Make sure the required fields are in the header, according to:
112109
http://www.gnu.org/software/gettext/manual/gettext.html#Header-Entry
@@ -355,7 +352,7 @@ def test_calls_in_fstring_with_partially_wrong_expression(self):
355352

356353
def test_function_and_class_names(self):
357354
"""Test that function and class names are not mistakenly extracted."""
358-
msgids = self.extract_messages_from_str(dedent('''\
355+
msgids = self.extract_from_str(dedent('''\
359356
def _(x):
360357
pass
361358

0 commit comments

Comments
 (0)