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

Method test_blankpattern

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

Source from the content-addressed store, hash-verified

174 compiled.pattern))
175
176 def test_blankpattern(self):
177 # Make sure when tuple or something has no values no regex is generated.
178 # Fixes bug #661354
179 test_locale = _strptime.LocaleTime()
180 test_locale.timezone = (frozenset(), frozenset())
181 self.assertEqual(_strptime.TimeRE(test_locale).pattern("%Z"), '',
182 "with timezone == ('',''), TimeRE().pattern('%Z') != ''")
183
184 def test_matching_with_escapes(self):
185 # Make sure a format that requires escaping of characters works

Callers

nothing calls this directly

Calls 2

patternMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected