Skip to content

Commit

Permalink
Fix verbosity on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hvingelby committed Jul 19, 2019
1 parent 2505ff7 commit 87096e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion danlp/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def download_model(model_name: str, cache_dir: str = DEFAULT_CACHE_DIR, process_

else:
# The model file will be downloaded directly to the model_file_path
_download_file(url, model_file_path, expected_size, expected_hash)
_download_file(url, model_file_path, expected_size, expected_hash, verbose=verbose)

else:
if verbose:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_pos_taggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
class TestPosTaggers(unittest.TestCase):
def test_flair_tagger(self):
# Download model beforehand
download_model('flair.pos', DEFAULT_CACHE_DIR, verbose=False)
download_model('flair.pos', DEFAULT_CACHE_DIR, verbose=True)
print("Downloaded the flair model")

# Load the POS tagger using the DaNLP wrapper
flair_model = load_pos_tagger_with_flair()
print("Load Flair model")

# Using the flair POS tagger
sentence = Sentence('jeg hopper på en bil som er rød sammen med Jens-Peter E. Hansen')
Expand Down

0 comments on commit 87096e6

Please sign in to comment.