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

Method test_whitespace_substitution

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

Source from the content-addressed store, hash-verified

201 " properly escaped")
202
203 def test_whitespace_substitution(self):
204 # When pattern contains whitespace, make sure it is taken into account
205 # so as to not allow subpatterns to end up next to each other and
206 # "steal" characters from each other.
207 pattern = self.time_re.pattern('%j %H')
208 self.assertFalse(re.match(pattern, "180"))
209 self.assertTrue(re.match(pattern, "18 0"))
210
211
212class StrptimeTests(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

patternMethod · 0.80
assertFalseMethod · 0.80
assertTrueMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected