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

Method replace

Lib/test/datetimetester.py:2419–2420  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

2417 def tzname(self, dt):
2418 class MyStr(str):
2419 def replace(self, *args):
2420 return None
2421 return MyStr('name')
2422 t = self.theclass(2005, 3, 2, 0, 0, 0, 0, MyTzInfo(3, 'name'))
2423 self.assertRaises(TypeError, t.strftime, '%Z')

Callers 15

test_fromutcMethod · 0.45
test_aware_datetimeMethod · 0.45
test_replaceMethod · 0.45
test_subclass_replaceMethod · 0.45
test_timestamp_naiveMethod · 0.45
test_timestamp_limitsMethod · 0.45
test_strptime_ampmMethod · 0.45
test_more_strftimeMethod · 0.45
test_replaceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected