where areth thou, file ?
@@ -8,18 +8,24 @@ def test_build_dependencies(en_vocab):
libs_ignore_setup = ["fugashi", "natto-py", "pythainlp"]
# check requirements.txt
+ req_dict = {}
try:
# for CLI usage
root_dir = Path(__file__).parent.parent
req_file = root_dir / "requirements.txt"
- req_dict = {}
with req_file.open() as f:
lines = f.readlines()
except FileNotFoundError as e:
+ try:
# for local usage
root_dir = Path(__file__).parent.parent.parent
req_file = root_dir / "requirements.txt"
- req_dict = {}
+ with req_file.open() as f:
+ lines = f.readlines()
+ except FileNotFoundError as e:
+ # where areth thou ?
+ root_dir = Path(__file__).parent.parent.parent.parent
+ req_file = root_dir / "requirements.txt"
with req_file.open() as f:
lines = f.readlines()
