(self)
| 5071 | MyClass = meta('MyClass', (), {}) |
| 5072 | |
| 5073 | def test_proxy_call(self): |
| 5074 | class FakeStr: |
| 5075 | __class__ = str |
| 5076 | |
| 5077 | fake_str = FakeStr() |
| 5078 | # isinstance() reads __class__ |
| 5079 | self.assertIsInstance(fake_str, str) |
| 5080 | |
| 5081 | # call a method descriptor |
| 5082 | with self.assertRaises(TypeError): |
| 5083 | str.split(fake_str) |
| 5084 | |
| 5085 | # call a slot wrapper descriptor |
| 5086 | with self.assertRaises(TypeError): |
| 5087 | str.__add__(fake_str, "abc") |
| 5088 | |
| 5089 | def test_specialized_method_calls_check_types(self): |
| 5090 | # https://github.com/python/cpython/issues/92063 |
nothing calls this directly
no test coverage detected