[elbe-devel] [PATCH 09/19] conftest.py: make flake8 compatible

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Mar 19 08:47:38 CET 2024


Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 conftest.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/conftest.py b/conftest.py
index d29b2c04182c..4c08f1dfb596 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,8 +1,9 @@
 import os
-import pytest
 
 import elbepack.directories
 
+import pytest
+
 
 def pytest_sessionstart(session):
     elbepack.directories.elbe_exe = os.path.join(os.path.dirname(__file__), 'elbe')
@@ -12,19 +13,19 @@ def pytest_sessionstart(session):
 # https://stackoverflow.com/a/61193490
 def pytest_addoption(parser):
     parser.addoption(
-        "--runslow", action="store_true", default=False, help="run slow tests"
+        '--runslow', action='store_true', default=False, help='run slow tests'
     )
 
 
 def pytest_configure(config):
-    config.addinivalue_line("markers", "slow: mark test as slow to run")
+    config.addinivalue_line('markers', 'slow: mark test as slow to run')
 
 
 def pytest_collection_modifyitems(config, items):
-    if config.getoption("--runslow"):
+    if config.getoption('--runslow'):
         # --runslow given in cli: do not skip slow tests
         return
-    skip_slow = pytest.mark.skip(reason="need --runslow option to run")
+    skip_slow = pytest.mark.skip(reason='need --runslow option to run')
     for item in items:
-        if "slow" in item.keywords:
+        if 'slow' in item.keywords:
             item.add_marker(skip_slow)

-- 
2.44.0



More information about the elbe-devel mailing list