<commit_before>import py
import unittest
import sys
unittest.failureException = AssertionError

def configproperty(name):
    def fget(self):
        ret = self._config.getvalue(name, self.fspath)
        return ret
    return property(fget)

class Module(py.test.collect.Module):
    UnitTestCase = configproperty('UnitTestCase')
    def makeitem(self, name, obj, usefilters=True):
        # XXX add generic test_suite() support(?)<commit_msg>[svn r58285] add docstring and version info<commit_after>"""

    collect and run traditional "unittest.py" style tests. 

    drop this conftest.py into your project directory so that
    all testing directories are below it. 

    you can mix unittest TestCase subclasses and 
    py.test style tests (discovery based on name). 

    user-extensions such as a custom test_suite() 
    will not be considered (see XXX). 

$Id: conftest.py 58285 2008-09-21 07:17:00Z hpk $
"""
import py
import unittest
import sys

__version__ = "$Rev: 58285 $".split()[1]

def configproperty(name):
    def fget(self):
        ret = self._config.getvalue(name, self.fspath)
        return ret
    return property(fget)

class Module(py.test.collect.Module):
    UnitTestCase = configproperty('UnitTestCase')
    def makeitem(self, name, obj, usefilters=True):
        # XXX add generic test_suite() support(?)
{'fraction_non_alphanumeric': 0.09648466716529544, 'fraction_numerical': 0.02243829468960359, 'mean_word_length': 3.662020905923345, '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': '7197259', 'n_tokens_mistral': 426, 'n_tokens_neox': 395, 'n_words': 128}