Minimal example:
from abc import abstractmethod, ABC
import pytest
class FixturesClass(ABC):
@pytest.fixture
def name_fixture(self) -> str:
return self.name + "_fixture"
@property
@abstractmethod
def name(self) -> str:
pass
class TestFixtures1(FixturesClass):
@property
def name(self) -> str:
return "test1"
def test_name_fixture(self, name_fixture: str):
assert name_fixture == "test1_fixture"
class TestFixtures2(FixturesClass):
def test_name_fixture(self, name_fixture: str):
assert name_fixture == "test2_fixture"
This was introduced in #12318
Sorry, duplicate of: #13546