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

Method test_extra_attributes

Lib/test/datetimetester.py:6131–6141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6129 self.assertEqual(x.__ge__(y), NotImplemented)
6130
6131 def test_extra_attributes(self):
6132 with self.assertWarns(DeprecationWarning):
6133 utcnow = datetime.utcnow()
6134 for x in [date.today(),
6135 time(),
6136 utcnow,
6137 timedelta(),
6138 tzinfo(),
6139 timezone(timedelta())]:
6140 with self.assertRaises(AttributeError):
6141 x.abc = 1
6142
6143 def test_check_arg_types(self):
6144 class Number:

Callers

nothing calls this directly

Calls 8

timeClass · 0.90
timedeltaClass · 0.90
tzinfoClass · 0.90
timezoneClass · 0.90
assertWarnsMethod · 0.80
utcnowMethod · 0.80
todayMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected