Skip to content

Commit 9ac166a

Browse files
author
Nito
committed
Improved file path
1 parent 50f3087 commit 9ac166a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eld/tests/test_detector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def test_load_ngrams_detect():
6868
def test_accuracy_m_bigtest():
6969
# TODO use importlib or pathlib to open txt file as package eld.tests.data resource
7070
detector = LanguageDetector('ngramsM60')
71-
file = open('data/big-test.txt', encoding='utf-8') # '../../benchmark/big-test.txt'
71+
file = open( os.path.dirname(__file__) + '/data/big-test.txt', encoding='utf-8')
72+
# '../../benchmark/big-test.txt'
7273
content = file.read()
7374
file.close()
7475
lines = content.strip().split("\n")

0 commit comments

Comments
 (0)