WorksApplications / SudachiPy

Python version of Sudachi, a Japanese tokenizer.
Apache License 2.0
392 stars 50 forks source link

How do I run the tests? #118

Closed polm closed 4 years ago

polm commented 4 years ago

Before submitting a PR I tried running the tests, but I cannot run the tests even with the current HEAD.

First I get an error that sys.dic can't be found. If I make a symlink to the sys.dic from the core dict then that goes away, but I get errors about user.dic not being found as well as other errors. I also get errors on stderr like this:

Exception ignored in: <function WordIdTable.__del__ at 0x7fdddc0e7820>
Traceback (most recent call last):
  File "/mnt/pool/code/sudachi-py/sudachipy/dictionarylib/wordidtable.py", line 26, in __del__
    self._bytes_view.release()
AttributeError: 'WordIdTable' object has no attribute '_bytes_view'

Is there something I can do to fix this?

sorami commented 4 years ago

How did you run the tests?

Did you try ./scripts/test.sh, which copies the test dictionary files from .travis/?

c.f. SudachiPy/README.md at develop · WorksApplications/SudachiPy

polm commented 4 years ago

Ah, I completely missed that section of the README, sorry :sweat_smile:

Running the script I was able to run the tests correctly, thank you.

sorami commented 4 years ago

Great!