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

Class tricky_notok

Lib/test/datetimetester.py:6011–6016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6009 # whether DST is assumed to be in effect. In this situation,
6010 # a ValueError should be raised by astimezone().
6011 class tricky_notok(ok):
6012 def dst(self, dt):
6013 if dt.year == 2000:
6014 return None
6015 else:
6016 return 10*HOUR
6017 dt = self.theclass(2001, 1, 1).replace(tzinfo=utc_real)
6018 self.assertRaises(ValueError, dt.astimezone, tricky_notok())
6019

Callers 1

test_bogus_dstMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_bogus_dstMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…