Skip to content

Commit 97bda15

Browse files
committed
ci: handle dataset for both ladybug and ladybug-python
1 parent 1c98cc3 commit 97bda15

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

test/test_helper.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
import sys
22
from pathlib import Path
33

4-
LBUG_ROOT = Path(__file__).parent.parent
4+
_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()
515

616
if sys.platform == "win32":
717
# \ in paths is not supported by lbug's parser

0 commit comments

Comments
 (0)