MCPcopy Index your code
hub / github.com/python/cpython / test_extract_all_comments

Method test_extract_all_comments

Lib/test/test_tools/test_i18n.py:448–459  ·  view source on GitHub ↗

Test that the --add-comments option without an explicit tag extracts all translator comments.

(self)

Source from the content-addressed store, hash-verified

446 )
447
448 def test_extract_all_comments(self):
449 """
450 Test that the --add-comments option without an
451 explicit tag extracts all translator comments.
452 """
453 for arg in ('--add-comments', '-c'):
454 with self.subTest(arg=arg):
455 data = self.extract_from_str(dedent('''\
456 # Translator comment
457 _("foo")
458 '''), args=(arg,), raw=True)
459 self.assertIn('#. Translator comment', data)
460
461 def test_comments_with_multiple_tags(self):
462 """

Callers

nothing calls this directly

Calls 4

extract_from_strMethod · 0.95
dedentFunction · 0.90
assertInMethod · 0.80
subTestMethod · 0.45

Tested by

no test coverage detected