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

Method test_setting_dict_to_invalid

Lib/test/test_funcattrs.py:358–362  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

356
357class FunctionDictsTest(FuncAttrsTest):
358 def test_setting_dict_to_invalid(self):
359 self.cannot_set_attr(self.b, '__dict__', None, TypeError)
360 from collections import UserDict
361 d = UserDict({'known_attr': 7})
362 self.cannot_set_attr(self.fi.a.__func__, '__dict__', d, TypeError)
363
364 def test_setting_dict_to_valid(self):
365 d = {'known_attr': 7}

Callers

nothing calls this directly

Calls 2

UserDictClass · 0.90
cannot_set_attrMethod · 0.80

Tested by

no test coverage detected