test suite that runs all nltk tests this module nltk test all is named as the nltk testsuite in the project s setupeggs py file here we create a test suite that runs all of our doctests and return it for processing by the setuptools test harness printhere000000000000000 print globos path joinos path dirnamefile doctest if os path splitpath1 index rst skips timedependent doctest in index rst print here 000000000000000 print glob os path join os path dirname __file__ doctest if os path split path 1 index rst skips time dependent doctest in index rst
import doctest
import os.path
import unittest
from glob import glob


def additional_tests():
    
    
    dir = os.path.dirname(__file__)
    paths = glob(os.path.join(dir, "*.doctest"))
    files = [os.path.basename(path) for path in paths]
    return unittest.TestSuite([doctest.DocFileSuite(file) for file in files])