MCPcopy Create free account
hub / github.com/dateutil/dateutil / testFileLastTransition

Method testFileLastTransition

tests/test_tz.py:2003–2014  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2001 self.assertEqual(end_est.tzname(), "EST")
2002
2003 def testFileLastTransition(self):
2004 # After the last transition, it goes to standard time in perpetuity
2005 tzc = tz.tzfile(BytesIO(base64.b64decode(TZFILE_EST5EDT)))
2006 self.assertEqual(datetime(2037, 10, 25, 0, 59, tzinfo=tzc).tzname(),
2007 "EDT")
2008
2009 last_date = tz.enfold(datetime(2037, 10, 25, 1, 00, tzinfo=tzc), fold=1)
2010 self.assertEqual(last_date.tzname(),
2011 "EST")
2012
2013 self.assertEqual(datetime(2038, 5, 25, 12, 0, tzinfo=tzc).tzname(),
2014 "EST")
2015
2016 def testInvalidFile(self):
2017 # Should throw a ValueError if an invalid file is passed

Callers

nothing calls this directly

Calls 1

tznameMethod · 0.45

Tested by

no test coverage detected