Exemple #1
0
    target="", base=False, rm=False, failed=("f", False), with_coverage=("c", False), cover_package=("p", "naya")
):
    """Run tests."""
    if rm:
        sh("rm .noseids .coverage")
    if base:
        command = ["nosetests"]
    else:
        command = ["nosetests -v --with-doctest"]

    if failed:
        command.append("--failed")
    if with_coverage:
        command.append("--with-coverage --cover-tests")
        if cover_package:
            command.append("--cover-package=%s" % cover_package)

    command.append("--with-id")

    if target:
        command.append(target)

    sh(" ".join(command))


action_shell = make_shell()


if __name__ == "__main__":
    run()
Exemple #2
0
#!/usr/bin/env python
from naya.script import make_shell
from werkzeug.script import make_runserver, run

from modular import app


action_shell = make_shell(lambda: {'app': app})
action_run = make_runserver(
    lambda: app, use_reloader=True, use_debugger=True
)


if __name__ == '__main__':
    run()