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

Method testSetattrNonStringName

Lib/test/test_class.py:676–681  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

674 A() + 1
675
676 def testSetattrNonStringName(self):
677 class A:
678 pass
679
680 with self.assertRaises(TypeError):
681 type.__setattr__(A, b'x', None)
682
683 def testTypeAttributeAccessErrorMessages(self):
684 class A:

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45
__setattr__Method · 0.45

Tested by

no test coverage detected