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

Class AlsoBogus

Lib/test/datetimetester.py:3291–3293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3289 self.assertEqual(dt.replace(tzinfo=bog).astimezone(f), dt_f)
3290
3291 class AlsoBogus(tzinfo):
3292 def utcoffset(self, dt): return timedelta(0)
3293 def dst(self, dt): return None
3294 alsobog = AlsoBogus()
3295 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive
3296

Callers 1

test_astimezoneMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_astimezoneMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…