diff --git a/scripts/test.sh b/scripts/test.sh index 1c611ce..12046f0 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -8,8 +8,11 @@ set -e # build dictionaries -python -m sudachipy.command_line build -o tests/resources/system.dic -d "the system dictionary for the unit tests" -m tests/resources/dict/matrix.def tests/resources/dict/lex.csv -python -m sudachipy.command_line ubuild -o tests/resources/user.dic -s tests/resources/system.dic tests/resources/dict/user.csv +if !(type sudachipy > /dev/null 2>&1); then + python setup.py develop +fi +sudachipy build -o tests/resources/system.dic -d "the system dictionary for the unit tests" -m tests/resources/dict/matrix.def tests/resources/dict/lex.csv +sudachipy ubuild -o tests/resources/user.dic -s tests/resources/system.dic tests/resources/dict/user.csv set +e @@ -21,4 +24,4 @@ if [[ $RES_TAIL != "OK" ]]; then >&2 echo "$RES" fi -exit $STATUS \ No newline at end of file +exit $STATUS