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

Class Bogus

Lib/test/datetimetester.py:3284–3286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3282 self.assertEqual(dt.astimezone(tz=f), dt_f) # naive
3283
3284 class Bogus(tzinfo):
3285 def utcoffset(self, dt): return None
3286 def dst(self, dt): return timedelta(0)
3287 bog = Bogus()
3288 self.assertRaises(ValueError, dt.astimezone, bog) # naive
3289 self.assertEqual(dt.replace(tzinfo=bog).astimezone(f), dt_f)

Callers 2

test_astimezoneMethod · 0.70

Calls

no outgoing calls

Tested by 2

test_astimezoneMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…