You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
24 lines
621 B
Python
24 lines
621 B
Python
# From 3.6 test_abc.py
|
|
# Bug was Receiver() class definition
|
|
import abc
|
|
import unittest
|
|
|
|
|
|
class TestABCWithInitSubclass(unittest.TestCase):
|
|
def test_works_with_init_subclass(self):
|
|
class ReceivesClassKwargs:
|
|
def __init_subclass__(cls, **kwargs):
|
|
super().__init_subclass__()
|
|
|
|
class Receiver(ReceivesClassKwargs, abc.ABC, x=1, y=2, z=3):
|
|
pass
|
|
|
|
|
|
def test_abstractmethod_integration(self):
|
|
for abstractthing in [abc.abstractmethod]:
|
|
|
|
class C(metaclass=abc.ABCMeta):
|
|
@abstractthing
|
|
def foo(self):
|
|
pass # abstract
|