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

Class FixedOffset

Lib/test/datetimetester.py:137–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

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

Calls

no outgoing calls

Tested by 15

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…