Merge pull request #70 from LuminosoInsight/pytest-fixes

Fixes to scripts that accidentally run during tests
This commit is contained in:
Lance Nathan 2019-04-16 11:41:27 -04:00 committed by GitHub
commit 832d8f2fdd
2 changed files with 5 additions and 5 deletions

View File

@ -1,2 +1,2 @@
[pytest]
addopts = --doctest-modules --doctest-glob=README.md
addopts = --doctest-modules --doctest-glob=README.md --ignore=scripts

View File

@ -8,7 +8,7 @@ import wordfreq
N = 1000
for lang in sorted(wordfreq.available_languages()):
for word in wordfreq.top_n_list(lang, 1000):
print('{}\t{}'.format(lang, word))
if __name__ == '__main__':
for lang in sorted(wordfreq.available_languages()):
for word in wordfreq.top_n_list(lang, 1000):
print('{}\t{}'.format(lang, word))