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

Method test_astimezone_default_eastern

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

Source from the content-addressed store, hash-verified

5634 # produced by %z directive.
5635 @support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
5636 def test_astimezone_default_eastern(self):
5637 dt = self.theclass(2012, 11, 4, 6, 30, tzinfo=timezone.utc)
5638 local = dt.astimezone()
5639 self.assertEqual(dt, local)
5640 self.assertEqual(local.strftime("%z %Z"), "-0500 EST")
5641 dt = self.theclass(2012, 11, 4, 5, 30, tzinfo=timezone.utc)
5642 local = dt.astimezone()
5643 self.assertEqual(dt, local)
5644 self.assertEqual(local.strftime("%z %Z"), "-0400 EDT")
5645
5646 @support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
5647 def test_astimezone_default_near_fold(self):

Callers

nothing calls this directly

Calls 3

astimezoneMethod · 0.80
assertEqualMethod · 0.45
strftimeMethod · 0.45

Tested by

no test coverage detected