[elbe-devel] [PATCH 3/4] tests: drop unnecessary calculations of elbe_dir
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed Feb 28 13:48:40 CET 2024
The same value is already available in elbepack.directories.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/tests/test_flake8.py | 6 ------
elbepack/tests/test_xml.py | 4 ----
2 files changed, 10 deletions(-)
diff --git a/elbepack/tests/test_flake8.py b/elbepack/tests/test_flake8.py
index 4ae8dfa7c44d..1a81ef0137df 100644
--- a/elbepack/tests/test_flake8.py
+++ b/elbepack/tests/test_flake8.py
@@ -2,18 +2,12 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2020 Linutronix GmbH
-import os
-
from elbepack.commands.test import ElbeTestCase, ElbeTestException, system
from elbepack.directories import elbe_exe, pack_dir
from elbepack.shellhelper import system_out
class TestPylint(ElbeTestCase):
- global elbe_dir # pylint: disable=global-statement
-
- elbe_dir = os.path.join(os.path.dirname(__file__), '../..')
-
flake8_opts = ['--max-line-length=100',
'--show-source']
diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
index bf6dce04236e..1cc6dc6050cc 100644
--- a/elbepack/tests/test_xml.py
+++ b/elbepack/tests/test_xml.py
@@ -14,10 +14,6 @@ from elbepack.directories import elbe_dir, elbe_exe
@unittest.skipIf(ElbeTestCase.level < ElbeTestLevel.INITVM,
'Test level not set to INITVM')
class TestSimpleXML(ElbeTestCase):
- global elbe_dir
-
- elbe_dir = os.path.join(os.path.dirname(__file__), '../..')
-
params = [os.path.join(elbe_dir, 'tests', fname)
for fname
in os.listdir(os.path.join(elbe_dir, 'tests'))
--
2.44.0
More information about the elbe-devel
mailing list