def test_inheritance(self):
        class AbstractPerson(Entity):
            using_options(abstract=True)
            using_options_defaults(tablename=camel_to_underscore)

            firstname = Field(String(30))
            lastname = Field(String(30))

        class AbstractEmployee(AbstractPerson):
            using_options(abstract=True)
            using_options_defaults(identity=camel_to_underscore)

            corporation = Field(String(30))

        class ConcreteEmployee(AbstractEmployee):
            service = Field(String(30))

        class ConcreteCitizen(AbstractPerson):
            country = Field(String(30))

        setup_all(True)

        assert not hasattr(AbstractPerson, 'table')
        assert not hasattr(AbstractEmployee, 'table')
        assert hasattr(ConcreteEmployee, 'table')
        assert hasattr(ConcreteCitizen, 'table')
        assert ConcreteEmployee.table.name == 'concrete_employee'
        assert ConcreteCitizen.table.name == 'concrete_citizen'

        assert 'firstname' in ConcreteEmployee.table.columns
        assert ConcreteEmployee.table.columns in 'lastname'
        assert 'corporation' in ConcreteEmployee.table.columns
        assert 'service' in ConcreteEmployee.table.columns

        assert 'firstname' in ConcreteCitizen.table.columns
        assert 'lastname' in ConcreteCitizen.table.columns
        assert 'corporation' not in ConcreteCitizen.table.columns
        assert 'country' in ConcreteCitizen.table.columns
        # test that the options_defaults do not leak into the parent base
        assert ConcreteCitizen._descriptor.identity == 'concretecitizen'
dataset/ETHPy150Open jmg/elixir/tests/test_abstract.py/TestAbstractInheritance.test_inheritance/swapped operands of `in`