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

Class tricky_notok

Lib/test/datetimetester.py:5824–5829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5822 # whether DST is assumed to be in effect. In this situation,
5823 # a ValueError should be raised by astimezone().
5824 class tricky_notok(ok):
5825 def dst(self, dt):
5826 if dt.year == 2000:
5827 return None
5828 else:
5829 return 10*HOUR
5830 dt = self.theclass(2001, 1, 1).replace(tzinfo=utc_real)
5831 self.assertRaises(ValueError, dt.astimezone, tricky_notok())
5832

Callers 1

test_bogus_dstMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_bogus_dstMethod · 0.68