Inherited test cases cannot be run separately
# Description
I cannot execute a inherited test. I am forced to execute all test cases in children class.
From my perspective, they are not correctly gathered.
Both parametrized and non-parametrize test cases are affected.
# Example code
```python
import pytest
class BaseTests:
"""Base class defining typical tests."""
def test_1(self):
...
class TestsForProduct(BaseTests):
"""Product class adapting parameters, fixtures and attributes for product specific behavior."""
```
# Screenshoots
In real example `TestHVIL` class inherits `test_hvil_open` test case and adapts fixtures.
Whole class execution is fine:
<img width="2214" height="415" alt="Image" src="https://github.com/user-attachments/assets/8d348fff-5cbb-446c-8c37-bbeeccd54bf5" />
When I try to run only the inherited test case (`test_hvil_open`) it says that the test suite is empty:
<img width="1219" height="247" alt="Image" src="https://github.com/user-attachments/assets/ce2a865f-d0df-4f1e-9d0f-169bcb21c17e" />
<img width="1449" height="442" alt="Image" src="https://github.com/user-attachments/assets/253d6979-1082-45a6-a12d-c0d98f950fee" />
# Configuration
OS: Windows (it seems that the problem is not OS related)
pytest version: 9:1.1
1 条评论