Beispiel #1
0
def main(buildout_part_name):
    assert buildout_part_name is not None, \
            "Please specify the name of a buildout part"

    print>>sys.stderr, "Preparing Zope environment ..."
    t0 = time()
    patch_sys_path(buildout_part_name)
    from zope_wrapper import zope_test_environment
    tzope = zope_test_environment(buildout_part_name)
    print>>sys.stderr, "Zope environment loaded in %.3f seconds" % (time()-t0)

    #from demo_http import demo_http_server; demo_http_server(tzope)

    print>>sys.stderr, "Calling nose.main ... "
    call_nose_main(tzope)
Beispiel #2
0
def main(buildout_part_name=None):
    """
    Main entry point. Set up Zope2 and then call `nose`.

    We take a single argument, `buildout_part_name`. It can be provided as
    function argument (zc.recipe.egg can pass it) or command-line argument.
    """
    if buildout_part_name is None:
        buildout_part_name = sys.argv[1]
        del sys.argv[1]

    log.info("Preparing Zope environment ...")
    t0 = time()
    patch_sys_path(buildout_part_name)
    from zope_wrapper import zope_test_environment
    tzope = zope_test_environment(buildout_part_name)
    log.info("Zope environment loaded in %.3f seconds" % (time()-t0))
    log.info("Calling nose.main ... ")
    call_nose_main(tzope)