We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dda0bf commit 03fd99cCopy full SHA for 03fd99c
1 file changed
backends/nxp/tests/config.py
@@ -15,6 +15,10 @@
15
# TODO(Robert Kalmar) In accordance with the "TODO(dbort): Prune /test[s]/ dirs, /third-party/ dirs" in pyproject.toml,
16
# once the test folders are not installed we can derive the path from current file location: `pathlib.Path(__file__)`
17
PROJECT_DIR = os.environ.get("PROJECT_DIR")
18
+if not PROJECT_DIR:
19
+ # Auto-detect: The PROJECT_DIR env variable is set by the conftest.py in backends.nxp.tests.conftest. But unittests
20
+ # don't use the conftest, so this variable is not set -> set it manually here in that case.
21
+ PROJECT_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
22
assert PROJECT_DIR and os.path.exists(
23
PROJECT_DIR
24
), f"Invalid PROJECT_DIR env variable: `{PROJECT_DIR}`."
0 commit comments