common-voice/cv-sentence-extractor

Implement Unit Tests for loader.rs

MichaelKohler opened this issue · 0 comments

Currently we have a few tests in the code base - such as checker.rs, but we do not have any tests for loader.rs.

The tests for loader.rs should check:

  • load_wikiextractor: do we correctly read the file?
  • load_wikiextractor: do we correctly parse the file content?
  • load_wikiextractor: do we correctly extract the text from an article?
  • load_wikiextractor: do we handle errors correctly?
  • load_file_names: do we correctly iterate over all files in the provided directory?
  • load_file_names: do we handle errors correctly?

In case #86 is fixed before this one here:

  • load_file_names: is the glob correctly passed and applied?