Open juhoinkinen opened 1 year ago
I think that could be a consequence of running the CLI tests via CliRunner. It simulates a CLI execution environment, but isn't quite the same as running the commands separately from a real CLI. If we wanted to test that, we'd need something like a shell script (or possibly even a bats test suite) that runs the annif commands separately.
When working on PR #708, I accidentally removed this inline import:
https://github.com/NatLibFi/Annif/blob/fb512928b455f785f4799e0c6b96db5ecbfb12b3/annif/project.py#L205
This made
annif index
command fail:But this was not detected by tests for
index
command. Seems that some commands that are tested before importannif.suggestion
, and this import remains forindex
command.The tests should probably be some way more isolated to be able to detected this kind of possibility for bugs.