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

Class Broken

Lib/test/datetimetester.py:3297–3299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3295 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive
3296
3297 class Broken(tzinfo):
3298 def utcoffset(self, dt): return 1
3299 def dst(self, dt): return 1
3300 broken = Broken()
3301 dt_broken = dt.replace(tzinfo=broken)
3302 with self.assertRaises(TypeError):

Callers 1

test_astimezoneMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_astimezoneMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…