<commit_before># ============================================================================
# PAVER MAKEFILE (pavement.py) -- behave
# ============================================================================
# REQUIRES: paver >= 1.0.3
# DESCRIPTION:
#   Provides platform-neutral "Makefile" for simple, project-specific tasks.
#   AVOID: setup support, because it is currently handled elsewhere.
#
# USAGE:
#   paver TASK [OPTIONS...]
#   paver help           -- Show all supported commands/tasks.
#   paver clean          -- Cleanup project workspace.
#   paver test           -- Run all tests (unittests, examples).
#
# SEE ALSO:
#  * http://pypi.python.org/pypi/Paver/
#  * http://www.blueskyonmars.com/projects/paver/
# ============================================================================

from paver.easy import *
# -- JE-DISABLED:
# from paver.setuputils import setup, install_distutils_tasks
# import paver.doctools
# -- USE EXTENSIONS: tasks, utility functions
from paver_ext.pip_download import download_depends, localpi
from paver_ext.python_checker import pychecker, pylint

# -- REQUIRED-FOR: setup, sdist, ...
# NOTE: Adds a lot more python-project related tasks.
# install_distutils_tasks()

# ----------------------------------------------------------------------------
# PROJECT CONFIGURATION (for sdist/setup mostly):
# ----------------------------------------------------------------------------
sys.path.insert(0, ".")

# ----------------------------------------------------------------------------
# TASK CONFIGURATION:
# ----------------------------------------------------------------------------
NAME = "behave"
options(
    sphinx=Bunch(
        docroot="docs",
        sourcedir=".",
        builddir="../build/docs"
    ),
    minilib=Bunch(
        extra_files=[ 'doctools', 'virtual' ]
    ),
    behave_test=Bunch(
        default_args=[ "tools/test-features/", "selftest.features/" ]
    ),
    pychecker = Bunch(
        default_args=NAME
    ),
    pylint = Bunch(
        default_args=NAME
    ),
    develop=Bunch(
        requirements_files=[
            "requirements.txt",
            "requirements-develop.txt",
        ],
        download_dir="downloads",
    ),
)

# ----------------------------------------------------------------------------
# TASKS:
# ----------------------------------------------------------------------------
@task
@consume_args
def docs(args):
    """Generate the documentation: html, pdf, ... (default: html)"""
    builders = args
    if not builders:
        builders = [ "html" ]
    for builder in builders:
        sphinx_build(builder)

@task
def linkcheck():
    """Check hyperlinks in documentation."""
    sphinx_build("linkcheck")


# ----------------------------------------------------------------------------
# TASK: test
# ----------------------------------------------------------------------------
@task
@consume_args
def test(args):
    """Execute all tests (unittests, feature tests)."""
    call_task("unittest")
    call_task("feature_test")

@task
@consume_args
def unittest(args):
    """Execute all unittests w/ nosetest runner."""
    cmdline = ""
    if args:
        cmdline = " ".join(args)
    nosetests(cmdline)

@task
@consume_args
def feature_test(args):
    """Execute all feature tests w/ behave."""
    if not args:
        # args = [ "features" ]
        args = options.behave_test.default_args

    args2   = []
    cmdopts = []
    for arg in args:
        if arg.startswith("-"):
            cmdopts.append(arg)
        else:
            args2.append(arg)

    cmdopts = " ".join(cmdopts)
    args = args2
    if not cmdopts:
        excluded_tags = "--tags=-xfail --tags=-not_supported"
        cmdopts = "--format=progress {0}".format(excluded_tags)
<commit_msg>FIX test: Make it work again.<commit_after># ============================================================================
# PAVER MAKEFILE (pavement.py) -- behave
# ============================================================================
# REQUIRES: paver >= 1.0.3
# DESCRIPTION:
#   Provides platform-neutral "Makefile" for simple, project-specific tasks.
#   AVOID: setup support, because it is currently handled elsewhere.
#
# USAGE:
#   paver TASK [OPTIONS...]
#   paver help           -- Show all supported commands/tasks.
#   paver clean          -- Cleanup project workspace.
#   paver test           -- Run all tests (unittests, examples).
#
# SEE ALSO:
#  * http://pypi.python.org/pypi/Paver/
#  * http://www.blueskyonmars.com/projects/paver/
# ============================================================================

from paver.easy import *
# -- JE-DISABLED:
# from paver.setuputils import setup, install_distutils_tasks
# import paver.doctools
# -- USE EXTENSIONS: tasks, utility functions
from paver_ext.pip_download import download_depends, localpi
from paver_ext.python_checker import pychecker, pylint

# -- REQUIRED-FOR: setup, sdist, ...
# NOTE: Adds a lot more python-project related tasks.
# install_distutils_tasks()

# ----------------------------------------------------------------------------
# PROJECT CONFIGURATION (for sdist/setup mostly):
# ----------------------------------------------------------------------------
sys.path.insert(0, ".")

# ----------------------------------------------------------------------------
# TASK CONFIGURATION:
# ----------------------------------------------------------------------------
NAME = "behave"
options(
    sphinx=Bunch(
        docroot="docs",
        sourcedir=".",
        builddir="../build/docs"
    ),
    minilib=Bunch(
        extra_files=[ 'doctools', 'virtual' ]
    ),
    behave_test=Bunch(
        default_args=[ "tools/test-features/", "selftest.features/" ]
    ),
    pychecker = Bunch(
        default_args=NAME
    ),
    pylint = Bunch(
        default_args=NAME
    ),
    develop=Bunch(
        requirements_files=[
            "requirements.txt",
            "requirements-develop.txt",
        ],
        download_dir="downloads",
    ),
)

# ----------------------------------------------------------------------------
# TASKS:
# ----------------------------------------------------------------------------
@task
@consume_args
def docs(args):
    """Generate the documentation: html, pdf, ... (default: html)"""
    builders = args
    if not builders:
        builders = [ "html" ]
    for builder in builders:
        sphinx_build(builder)

@task
def linkcheck():
    """Check hyperlinks in documentation."""
    sphinx_build("linkcheck")


# ----------------------------------------------------------------------------
# TASK: test
# ----------------------------------------------------------------------------
@task
@consume_args
def test(args):
    """Execute all tests (unittests, feature tests)."""
    call_task("unittest")
    call_task("feature_test")

@task
@consume_args
def unittest(args):
    """Execute all unittests w/ nosetest runner."""
    cmdline = ""
    if args:
        cmdline = " ".join(args)
    nosetests(cmdline)

@task
@consume_args
def feature_test(args):
    """Execute all feature tests w/ behave."""
    if not args:
        # args = [ "features" ]
        args = options.behave_test.default_args
        cmdopts = []
    else:
        # -- INSPECT and REORGANIZE:
        args2   = []
        cmdopts = []
        tests1  = []
        tests2  = []
        for arg in args:
            if arg.startswith("-"):
                cmdopts.append(arg)
            elif arg.startswith("tools"):
                tests1.append(arg)
            elif arg.startswith("selftest.features"):
                tests2.append(arg)
            else:
                args2.append(arg)
        args = []
        if tests1:
            args.append(" ".join(tests1))
        if tests2:
            args.append(" ".join(tests2))
        if args2:
            args.append(" ".join(args2))

    cmdopts = " ".join(cmdopts)
    # XXX args = args2
    if not cmdopts:
        excluded_tags = "--tags=-xfail --tags=-not_supported"
        cmdopts = "--format=progress {0}".format(excluded_tags)

{'fraction_non_alphanumeric': 0.31288647044274054, 'fraction_numerical': 0.003215434083601286, 'mean_word_length': 1.6265021110750244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2912014', 'n_tokens_mistral': 2201, 'n_tokens_neox': 2137, 'n_words': 484}