MCPcopy
hub / github.com/django/django / _get_token_line_number

Method _get_token_line_number

tests/i18n/test_extraction.py:95–103  ·  view source on GitHub ↗
(self, path, token)

Source from the content-addressed store, hash-verified

93 )
94
95 def _get_token_line_number(self, path, token):
96 with open(path) as f:
97 for line, content in enumerate(f, 1):
98 if token in content:
99 return line
100 self.fail(
101 "The token '%s' could not be found in %s, please check the test config"
102 % (token, path)
103 )
104
105 def assertLocationCommentPresent(self, po_filename, line_number, *comment_parts):
106 r"""

Callers 1

_assertPoLocCommentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected