<commit_before># Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.

from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from os.path import dirname,join,pardir

from . import compat

def test_suite():
    m =  doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS)
    m += compat.Manuel()
    m += capture.Manuel()
    return TestSuite(
        m,
        *glob(join(dirname(__file__),pardir,pardir,'docs','*.txt'))
        )<commit_msg>Allow docs to test to be found elsewhere. (they're not unpacked by installing the sdist)<commit_after># Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.

from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir

import os

from . import compat

path = os.environ.get('DOCPATH', join(dirname(__file__),pardir,pardir,'docs'))
tests = glob(join(path,'*.txt'))

if not tests:
    raise SkipTest('No docs found to test') # pragma: no cover

def test_suite():
    m =  doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS)
    m += compat.Manuel()
    m += capture.Manuel()
    return TestSuite(m, *tests)
{'fraction_non_alphanumeric': 0.1038374717832957, 'fraction_numerical': 0.012039127163280662, 'mean_word_length': 4.473251028806584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4716395', 'n_tokens_mistral': 459, 'n_tokens_neox': 427, 'n_words': 132}