Don't use setattr

This commit is contained in:
Matthias 2024-04-20 09:46:32 +02:00
parent e0aefb9b54
commit 6a1c33e168

View File

@ -52,7 +52,7 @@ def pytest_configure(config):
"markers", "longrun: mark test that is running slowly and should not be run regularly"
)
if not config.option.longrun:
setattr(config.option, 'markexpr', 'not longrun')
config.option.markexpr = 'not longrun'
class FixtureScheduler(LoadScopeScheduling):