Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzedir command #95

Merged
merged 5 commits into from
Apr 6, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
extend analyzedir unit test to check for overwriting
  • Loading branch information
osma committed Apr 6, 2018
commit 37d56b823cdd289047d1f158709d0e3e6e48b738
7 changes: 7 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ def test_analyzedir(tmpdir):
assert tmpdir.join('doc1.annif').read_text(
'utf-8') == "<http:https://example.org/dummy>\tdummy\t0.5\n"

# make sure that preexisting subject files are not overwritten
result = runner.invoke(
annif.cli.cli, ['analyzedir', 'dummy-en', str(tmpdir)])
assert not result.exception
assert result.exit_code == 0
assert "Not overwriting" in result.output


def test_eval_label(tmpdir):
keyfile = tmpdir.join('dummy.key')
Expand Down