Skip to content

Commit

Permalink
skip more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Nov 29, 2012
1 parent 1a21e97 commit cbb0666
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nltk/app/__init__.py
Expand Up @@ -45,3 +45,8 @@
"(requires the pylab library).")
else:
from .wordfreq_app import app as wordfreq

# skip doctests from this package
def setup_module(module):
from nose import SkipTest
raise SkipTest("nltk.app examples are not doctests")
5 changes: 5 additions & 0 deletions nltk/draw/__init__.py
Expand Up @@ -19,3 +19,8 @@
TreeWidget, TreeView, draw_trees)
from .dispersion import dispersion_plot
from .table import Table

# skip doctests from this package
def setup_module(module):
from nose import SkipTest
raise SkipTest("nltk.draw examples are not doctests")
6 changes: 6 additions & 0 deletions nltk/misc/babelfish.py
Expand Up @@ -204,5 +204,11 @@ def babelize_shell():
# absence makes the heart grow fonder (italian)
# more idioms: http://www.idiomsite.com/


# skip tests for this module because the online service is gone
def setup_module(module):
from nose import SkipTest
raise SkipTest("Babelfish online service is gone")

if __name__ == '__main__':
babelize_shell()
7 changes: 7 additions & 0 deletions nltk/tag/hunpos.py
Expand Up @@ -120,6 +120,13 @@ def tag(self, tokens):

return tagged_tokens

# skip doctests if Hunpos tagger is not installed
def setup_module(module):
from nose import SkipTest
try:
HunposTagger('english.model')
except LookupError:
raise SkipTest("HunposTagger is not available")

if __name__ == "__main__":
import doctest
Expand Down
2 changes: 2 additions & 0 deletions nltk/test/unit/test_babelfish.py
Expand Up @@ -2,7 +2,9 @@
from __future__ import absolute_import, unicode_literals
import unittest
from nltk.misc import babelfish
from .utils import skip

@skip("Babelfish online service is gone")
class BabelfishTest(unittest.TestCase):
def test_greek(self):
txt = 'Η Εταιρεία'
Expand Down

0 comments on commit cbb0666

Please sign in to comment.