This commit is contained in:
Iliyan Angelov
2025-12-01 06:50:10 +02:00
parent 91f51bc6fe
commit 62c1fe5951
4682 changed files with 544807 additions and 31208 deletions

View File

@@ -0,0 +1,26 @@
"""Test suite that runs all NLTK tests.
This module, `nltk.test.all`, is named as the NLTK ``test_suite`` in the
project's ``setup-eggs.py`` file. Here, we create a test suite that
runs all of our doctests, and return it for processing by the setuptools
test harness.
"""
import doctest
import os.path
import unittest
from glob import glob
def additional_tests():
# print("here-000000000000000")
# print("-----", glob(os.path.join(os.path.dirname(__file__), '*.doctest')))
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])
# if os.path.split(path)[-1] != 'index.rst'
# skips time-dependent doctest in index.rst