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

Method test_strptime_z_empty

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

Source from the content-addressed store, hash-verified

3134 self.theclass.strptime('02-29,2024', '%m-%d,%Y')
3135
3136 def test_strptime_z_empty(self):
3137 for directive in ('z', ':z'):
3138 string = '2025-04-25 11:42:47'
3139 format = f'%Y-%m-%d %H:%M:%S%{directive}'
3140 target = self.theclass(2025, 4, 25, 11, 42, 47)
3141 with self.subTest(string=string,
3142 format=format,
3143 target=target):
3144 result = self.theclass.strptime(string, format)
3145 self.assertEqual(result, target)
3146
3147 def test_more_timetuple(self):
3148 # This tests fields beyond those tested by the TestDate.test_timetuple.

Callers

nothing calls this directly

Calls 3

subTestMethod · 0.45
strptimeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected