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

Method test_fromisoformat_ambiguous

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

Source from the content-addressed store, hash-verified

3530 self.assertEqual(dt, dt_rt)
3531
3532 def test_fromisoformat_ambiguous(self):
3533 # Test strings like 2018-01-31+12:15 (where +12:15 is not a time zone)
3534 separators = ['+', '-']
3535 for sep in separators:
3536 dt = self.theclass(2018, 1, 31, 12, 15)
3537 dtstr = dt.isoformat(sep=sep)
3538
3539 with self.subTest(dtstr=dtstr):
3540 dt_rt = self.theclass.fromisoformat(dtstr)
3541 self.assertEqual(dt, dt_rt)
3542
3543 def test_fromisoformat_timespecs(self):
3544 datetime_bases = [

Callers

nothing calls this directly

Calls 4

isoformatMethod · 0.45
subTestMethod · 0.45
fromisoformatMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected