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

Class FixedOffset

Lib/test/datetimetester.py:132–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130# tzinfo tests
131
132class FixedOffset(tzinfo):
133
134 def __init__(self, offset, name, dstoffset=42):
135 if isinstance(offset, int):
136 offset = timedelta(minutes=offset)
137 if isinstance(dstoffset, int):
138 dstoffset = timedelta(minutes=dstoffset)
139 self.__offset = offset
140 self.__name = name
141 self.__dstoffset = dstoffset
142 def __repr__(self):
143 return self.__name.lower()
144 def utcoffset(self, dt):
145 return self.__offset
146 def tzname(self, dt):
147 return self.__name
148 def dst(self, dt):
149 return self.__dstoffset
150
151class PicklableFixedOffset(FixedOffset):
152

Callers 15

test_normalMethod · 0.70
test_isoformatMethod · 0.70
test_astimezoneMethod · 0.70
test_zonesMethod · 0.70
test_hash_edge_casesMethod · 0.70
test_more_boolMethod · 0.70
test_replaceMethod · 0.70
test_mixed_compareMethod · 0.70
test_subclass_timetzMethod · 0.70
test_picklingMethod · 0.70
test_extreme_hashesMethod · 0.70

Calls

no outgoing calls

Tested by 15

test_normalMethod · 0.56
test_isoformatMethod · 0.56
test_astimezoneMethod · 0.56
test_zonesMethod · 0.56
test_hash_edge_casesMethod · 0.56
test_more_boolMethod · 0.56
test_replaceMethod · 0.56
test_mixed_compareMethod · 0.56
test_subclass_timetzMethod · 0.56
test_picklingMethod · 0.56
test_extreme_hashesMethod · 0.56