<commit_before>import py

Module = py.test.collect.Module
DoctestFile = py.test.collect.DoctestFile
Directory = py.test.collect.Directory
Class = py.test.collect.Class
Generator = py.test.collect.Generator
Function = py.test.Function
Instance = py.test.collect.Instance

additionalinfo = None


# ===================================================
# Distributed testing specific options 

#dist_hosts: needs to be provided by user
#dist_rsync_roots: might be provided by user, if not present or None,
#                  whole pkgdir will be rsynced
dist_remotepython = "python"
dist_taskspernode = 15
dist_boxed = False
if hasattr(py.std.os, 'nice'):
    dist_nicelevel = py.std.os.nice(0) # nice py.test works
else:
    dist_nicelevel = 0
_dist_import_pypy = False # used for regenerating JS application 
dist_rsync_ignore = []

# ===================================================

def adddefaultoptions(config):
    Option = config.Option 
    config._addoptions('general options',
        Option('-v', '--verbose',
               action="count", dest="verbose", default=0,
               help="increase verbosity."),
        Option('-x', '--exitfirst',
               action="store_true", dest="exitfirst", default=False,
               help="exit instantly on first error or failed test."),
        Option('-s', '--nocapture',
               action="store_true", dest="nocapture", default=False,
               help="disable catching of sys.stdout/stderr output."),
        Option('-k',
               action="store", dest="keyword", default='',
               help="only run test items matching the given (google-style) "
                    "keyword expression."),
        Option('-l', '--showlocals',
               action="store_true", dest="showlocals", default=False,
               help="show locals in tracebacks (disabled by default)."),
        Option('', '--pdb',
               action="store_true", dest="usepdb", default=False,
               help="start pdb (the Python debugger) on errors."),
        Option('', '--tb',
               action="store", dest="tbstyle", default='long',
               type="choice", choices=['long', 'short', 'no'],
               help="traceback verboseness (long/short/no)."),
        Option('', '--fulltrace',
               action="store_true", dest="fulltrace", default=False,
               help="don't cut any tracebacks (default is to cut)."),
        Option('', '--nomagic',
               action="store_true", dest="nomagic", default=False,
               help="refrain from using magic as much as possible."),
        Option('', '--collectonly',
               action="store_true", dest="collectonly", default=False,
               help="only collect tests, don't execute them."),
        Option('', '--traceconfig',
               action="store_true", dest="traceconfig", default=False,
               help="trace considerations of conftest.py files."),
    )

    config._addoptions('EXPERIMENTAL options',
        Option('-f', '--looponfailing',
               action="store_true", dest="looponfailing", default=False,
               help="loop on failing test set."),
        Option('', '--exec',
               action="store", dest="executable", default=None,
               help="python executable to run the tests with."),
        Option('-d', '--dist',
               action="store_true", dest="dist", default=False,
               help="ad-hoc distribute tests across machines (requires conftest settings)"), 
        Option('-w', '--startserver',
               action="store_true", dest="startserver", default=False,
               help="starts local web server for displaying test progress.", 
               ),
        Option('-r', '--runbrowser',
               action="store_true", dest="runbrowser", default=False,
               help="run browser (implies --startserver)."
               ),
        Option('', '--boxed',
               action="store_true", dest="boxed", default=False,
               help="box each test run in a separate process"), 
        Option('', '--rest',
               action='store_true', dest="restreport", default=False,
               help="restructured text output reporting."),
        Option('', '--apigen',
               action="store", dest="apigen",
               help="generate api documentation while testing (requires "
               "argument pointing to a script)."),
        Option('', '--session',
               action="store", dest="session", default=None,
               help="lookup given sessioname in conftest.py files and use it."), 
    )
    <commit_msg>[svn r38219] looponfailing and exec are not so experimental<commit_after>import py

Module = py.test.collect.Module
DoctestFile = py.test.collect.DoctestFile
Directory = py.test.collect.Directory
Class = py.test.collect.Class
Generator = py.test.collect.Generator
Function = py.test.Function
Instance = py.test.collect.Instance

additionalinfo = None


# ===================================================
# Distributed testing specific options 

#dist_hosts: needs to be provided by user
#dist_rsync_roots: might be provided by user, if not present or None,
#                  whole pkgdir will be rsynced
dist_remotepython = "python"
dist_taskspernode = 15
dist_boxed = False
if hasattr(py.std.os, 'nice'):
    dist_nicelevel = py.std.os.nice(0) # nice py.test works
else:
    dist_nicelevel = 0
_dist_import_pypy = False # used for regenerating JS application 
dist_rsync_ignore = []

# ===================================================

def adddefaultoptions(config):
    Option = config.Option 
    config._addoptions('general options',
        Option('-v', '--verbose',
               action="count", dest="verbose", default=0,
               help="increase verbosity."),
        Option('-x', '--exitfirst',
               action="store_true", dest="exitfirst", default=False,
               help="exit instantly on first error or failed test."),
        Option('-s', '--nocapture',
               action="store_true", dest="nocapture", default=False,
               help="disable catching of sys.stdout/stderr output."),
        Option('-k',
               action="store", dest="keyword", default='',
               help="only run test items matching the given (google-style) "
                    "keyword expression."),
        Option('-l', '--showlocals',
               action="store_true", dest="showlocals", default=False,
               help="show locals in tracebacks (disabled by default)."),
        Option('', '--pdb',
               action="store_true", dest="usepdb", default=False,
               help="start pdb (the Python debugger) on errors."),
        Option('', '--tb',
               action="store", dest="tbstyle", default='long',
               type="choice", choices=['long', 'short', 'no'],
               help="traceback verboseness (long/short/no)."),
        Option('', '--fulltrace',
               action="store_true", dest="fulltrace", default=False,
               help="don't cut any tracebacks (default is to cut)."),
        Option('', '--nomagic',
               action="store_true", dest="nomagic", default=False,
               help="refrain from using magic as much as possible."),
        Option('', '--collectonly',
               action="store_true", dest="collectonly", default=False,
               help="only collect tests, don't execute them."),
        Option('', '--traceconfig',
               action="store_true", dest="traceconfig", default=False,
               help="trace considerations of conftest.py files."),
        Option('-f', '--looponfailing',
               action="store_true", dest="looponfailing", default=False,
               help="loop on failing test set."),
        Option('', '--exec',
               action="store", dest="executable", default=None,
               help="python executable to run the tests with."),
    )

    config._addoptions('EXPERIMENTAL options',
        Option('-d', '--dist',
               action="store_true", dest="dist", default=False,
               help="ad-hoc distribute tests across machines (requires conftest settings)"), 
        Option('-w', '--startserver',
               action="store_true", dest="startserver", default=False,
               help="starts local web server for displaying test progress.", 
               ),
        Option('-r', '--runbrowser',
               action="store_true", dest="runbrowser", default=False,
               help="run browser (implies --startserver)."
               ),
        Option('', '--boxed',
               action="store_true", dest="boxed", default=False,
               help="box each test run in a separate process"), 
        Option('', '--rest',
               action='store_true', dest="restreport", default=False,
               help="restructured text output reporting."),
        Option('', '--apigen',
               action="store", dest="apigen",
               help="generate api documentation while testing (requires "
               "argument pointing to a script)."),
        Option('', '--session',
               action="store", dest="session", default=None,
               help="lookup given sessioname in conftest.py files and use it."), 
    )
    
{'fraction_non_alphanumeric': 0.16110147441457068, 'fraction_numerical': 0.0016261925411968777, 'mean_word_length': 2.4002948765204573, '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': '6019409', 'n_tokens_mistral': 2432, 'n_tokens_neox': 2341, 'n_words': 634}