diff options
Diffstat (limited to 'Lib/test/test_abc.py')
-rw-r--r-- | Lib/test/test_abc.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_abc.py b/Lib/test/test_abc.py index c1d750d..1e7a035 100644 --- a/Lib/test/test_abc.py +++ b/Lib/test/test_abc.py @@ -668,6 +668,19 @@ def test_factory(abc_ABCMeta, abc_get_cache_token): class Receiver(ReceivesClassKwargs, abc_ABC, x=1, y=2, z=3): pass self.assertEqual(saved_kwargs, dict(x=1, y=2, z=3)) + + def test_positional_only_and_kwonlyargs_with_init_subclass(self): + saved_kwargs = {} + + class A: + def __init_subclass__(cls, **kwargs): + super().__init_subclass__() + saved_kwargs.update(kwargs) + + class B(A, metaclass=abc_ABCMeta, name="test"): + pass + self.assertEqual(saved_kwargs, dict(name="test")) + return TestLegacyAPI, TestABC, TestABCWithInitSubclass TestLegacyAPI_Py, TestABC_Py, TestABCWithInitSubclass_Py = test_factory(abc.ABCMeta, |