(self)
| 2819 | self.assertNotHasAttr(aa, 'arg') |
| 2820 | |
| 2821 | def test_staticmethod_register(self): |
| 2822 | class A: |
| 2823 | @functools.singledispatchmethod |
| 2824 | @staticmethod |
| 2825 | def t(arg): |
| 2826 | return arg |
| 2827 | @t.register(int) |
| 2828 | @staticmethod |
| 2829 | def _(arg): |
| 2830 | return isinstance(arg, int) |
| 2831 | @t.register(str) |
| 2832 | @staticmethod |
| 2833 | def _(arg): |
| 2834 | return isinstance(arg, str) |
| 2835 | a = A() |
| 2836 | |
| 2837 | self.assertTrue(A.t(0)) |
| 2838 | self.assertTrue(A.t('')) |
| 2839 | self.assertEqual(A.t(0.0), 0.0) |
| 2840 | |
| 2841 | def test_slotted_class(self): |
| 2842 | class Slot: |
nothing calls this directly
no test coverage detected