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

Method test_pattern_escaping

Lib/test/test_strptime.py:140–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

138 pattern_string)
139
140 def test_pattern_escaping(self):
141 # Make sure any characters in the format string that might be taken as
142 # regex syntax is escaped.
143 pattern_string = self.time_re.pattern(r"\d+")
144 self.assertIn(r"\\d\+", pattern_string,
145 "%s does not have re characters escaped properly" %
146 pattern_string)
147
148 @skip_if_buggy_ucrt_strfptime
149 def test_compile(self):

Callers

nothing calls this directly

Calls 2

patternMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected