[elbe-devel] [PATCH 15/19] test_preproc: use test parameter helpers

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


Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/tests/test_preproc.py | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/elbepack/tests/test_preproc.py b/elbepack/tests/test_preproc.py
index be773465b2b5..2e657548757a 100644
--- a/elbepack/tests/test_preproc.py
+++ b/elbepack/tests/test_preproc.py
@@ -2,22 +2,10 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 # SPDX-FileCopyrightText: 2020-2021 Linutronix GmbH
 
-import os
+from elbepack.directories import run_elbe
+from elbepack.tests import parametrize_xml_test_files
 
-from elbepack.directories import elbe_dir, run_elbe
 
-import pytest
-
-
-def _test_cases():
-    return [
-        os.path.join(elbe_dir, 'tests', fname)
-        for fname
-        in os.listdir(os.path.join(elbe_dir, 'tests'))
-        if fname.startswith('preproc') and fname.endswith('.xml')
-    ]
-
-
- at pytest.mark.parametrize('f', _test_cases())
+ at parametrize_xml_test_files('f', 'preproc')
 def test_preproc(f):
     run_elbe(['preprocess', f], check=True)

-- 
2.44.0



More information about the elbe-devel mailing list