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

Method test_strptime_n_and_t_format

Lib/test/datetimetester.py:2214–2226  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2212 )
2213
2214 def test_strptime_n_and_t_format(self):
2215 format_directives = ('%n', '%t', '%n%t', '%t%n')
2216 whitespaces = ('', ' ', '\t', '\r', '\v', '\n', '\f')
2217 for fd in format_directives:
2218 for ws in (*whitespaces, ''.join(whitespaces)):
2219 with self.subTest(format_directive=fd, whitespace=ws):
2220 self.assertEqual(
2221 self.theclass.strptime(
2222 f"2026{ws}02{ws}03",
2223 f"%Y{fd}%m{fd}%d",
2224 ),
2225 self.theclass(2026, 2, 3),
2226 )
2227
2228
2229#############################################################################

Callers

nothing calls this directly

Calls 4

joinMethod · 0.45
subTestMethod · 0.45
assertEqualMethod · 0.45
strptimeMethod · 0.45

Tested by

no test coverage detected