[PATCH 1/5] test: conftest.py: move top-level

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Aug 22 04:57:26 PDT 2024


We have a top level pytest.ini to support running pytest --lg-env=$some_env
without extra arguments. This works for running tests nornally, but not if
extra options like --qemu should be used, because the conftest.py won't
be loaded early enough.

The easy fix is moving the conftest.py a level higher as described in:

  https://github.com/pytest-dev/pytest/issues/5822#issuecomment-697331920

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 test/conftest.py => conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename test/conftest.py => conftest.py (99%)

diff --git a/test/conftest.py b/conftest.py
similarity index 99%
rename from test/conftest.py
rename to conftest.py
index 12daf3a058ff..56d4b512a912 100644
--- a/test/conftest.py
+++ b/conftest.py
@@ -1,7 +1,7 @@
 import pytest
 import os
 import argparse
-from .py import helper
+from test.py import helper
 
 
 @pytest.fixture(scope='function')
-- 
2.39.2




More information about the barebox mailing list