We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c98cc3 commit 97bda15Copy full SHA for 97bda15
1 file changed
test/test_helper.py
@@ -1,7 +1,17 @@
1
import sys
2
from pathlib import Path
3
4
-LBUG_ROOT = Path(__file__).parent.parent
+_REPO_ROOT = Path(__file__).parent.parent.resolve()
5
+
6
7
+def _resolve_lbug_root() -> Path:
8
+ for candidate in (_REPO_ROOT, *_REPO_ROOT.parents):
9
+ if (candidate / "dataset").exists():
10
+ return candidate
11
+ return _REPO_ROOT
12
13
14
+LBUG_ROOT = _resolve_lbug_root()
15
16
if sys.platform == "win32":
17
# \ in paths is not supported by lbug's parser
0 commit comments