MCPcopy Index your code
hub / github.com/RustPython/RustPython / Bogus

Class Bogus

Lib/test/datetimetester.py:3119–3121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3117 self.assertEqual(dt.astimezone(tz=f), dt_f) # naive
3118
3119 class Bogus(tzinfo):
3120 def utcoffset(self, dt): return None
3121 def dst(self, dt): return timedelta(0)
3122 bog = Bogus()
3123 self.assertRaises(ValueError, dt.astimezone, bog) # naive
3124 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