[elbe-devel] [PATCH] elbevalidate: call pytest.main() with correct arguments
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jun 21 09:52:18 CEST 2024
The type signature of pytest.main() expects either a single os.PathLike
or a list of strings.
While the current call with a list of os.PathLike seems to work, it
makes the typechecker unhappy.
Convert all arguments to strings.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbevalidate/pytest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elbevalidate/pytest.py b/elbevalidate/pytest.py
index 2c6e296c5c48..0802a5a7d609 100644
--- a/elbevalidate/pytest.py
+++ b/elbevalidate/pytest.py
@@ -50,5 +50,5 @@ def run_with_pytest(test_script: os.PathLike, build_dir: os.PathLike):
Available to tests as fixture `build_dir` of :class:`pathlib.Path`.
"""
- sys.exit(pytest.main(['--elbe-build-dir', build_dir, '--', test_script],
+ sys.exit(pytest.main(['--elbe-build-dir', os.fspath(build_dir), '--', os.fspath(test_script)],
[_ElbeValidationPlugin(test_script)]))
---
base-commit: 6706783bfad7009801bfd404e7884651d00caab2
change-id: 20240621-elbevalidate-mypy-ae5fc2bf40cf
Best regards,
--
Thomas Weißschuh <thomas.weissschuh at linutronix.de>
More information about the elbe-devel
mailing list