(self)
| 4900 | self.assertNotIsSubclass(dict, MyMapping) |
| 4901 | |
| 4902 | def test_abc_bases(self): |
| 4903 | class MM(MutableMapping[str, str]): |
| 4904 | def __getitem__(self, k): |
| 4905 | return None |
| 4906 | def __setitem__(self, k, v): |
| 4907 | pass |
| 4908 | def __delitem__(self, k): |
| 4909 | pass |
| 4910 | def __iter__(self): |
| 4911 | return iter(()) |
| 4912 | def __len__(self): |
| 4913 | return 0 |
| 4914 | # this should just work |
| 4915 | MM().update() |
| 4916 | self.assertIsInstance(MM(), collections.abc.MutableMapping) |
| 4917 | self.assertIsInstance(MM(), MutableMapping) |
| 4918 | self.assertNotIsInstance(MM(), List) |
| 4919 | self.assertNotIsInstance({}, MM) |
| 4920 | |
| 4921 | def test_multiple_bases(self): |
| 4922 | class MM1(MutableMapping[str, str], collections.abc.MutableMapping): |
nothing calls this directly
no test coverage detected