[at-spi2-core: 2/17] ci/run-registryd-tests.sh: Run pytest via python3 -m pytest to get the import path I expect
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 2/17] ci/run-registryd-tests.sh: Run pytest via python3 -m pytest to get the import path I expect
- Date: Wed, 12 Oct 2022 00:58:50 +0000 (UTC)
commit f8ec671c3faae60de4eca2ead3e3764dcac9ae10
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Sep 1 14:54:52 2022 -0500
ci/run-registryd-tests.sh: Run pytest via python3 -m pytest to get the import path I expect
Using "python3 -m pytest ..." will add $CWD to python's sys.path, so
that "import foo" inside test_file.py will look for test_file_parent/foo.py
as expected.
https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html#invoking-pytest-versus-python-m-pytest
ci/run-registryd-tests.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/ci/run-registryd-tests.sh b/ci/run-registryd-tests.sh
index 5325261c..863041c4 100755
--- a/ci/run-registryd-tests.sh
+++ b/ci/run-registryd-tests.sh
@@ -16,6 +16,6 @@ mkdir -p _build/tests/registryd
cd tests/registryd
-pytest --junit-xml=../../_build/tests/registryd/registryd-pytest.junit.xml
+python3 -m pytest --junit-xml=../../_build/tests/registryd/registryd-pytest.junit.xml
kill %1 # Kill python dbusmock
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]