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

Method test_pattern

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

Source from the content-addressed store, hash-verified

125 self.locale_time = _strptime.LocaleTime()
126
127 def test_pattern(self):
128 # Test TimeRE.pattern
129 pattern_string = self.time_re.pattern(r"%a %A %d %Y")
130 self.assertTrue(pattern_string.find(self.locale_time.a_weekday[2]) != -1,
131 "did not find abbreviated weekday in pattern string '%s'" %
132 pattern_string)
133 self.assertTrue(pattern_string.find(self.locale_time.f_weekday[4]) != -1,
134 "did not find full weekday in pattern string '%s'" %
135 pattern_string)
136 self.assertTrue(pattern_string.find(self.time_re['d']) != -1,
137 "did not find 'd' directive pattern string '%s'" %
138 pattern_string)
139
140 def test_pattern_escaping(self):
141 # Make sure any characters in the format string that might be taken as

Callers

nothing calls this directly

Calls 3

patternMethod · 0.80
assertTrueMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected