コード例 #1
0
def global_module_hook(request):
    trace("\n----------global module start------------\n")
    rv = stf.fixture_callback(request, "module", False)
    if rv:
        return rv

    def fin():
        rv = stf.fixture_callback(request, "module", True)
        trace("\n----------global module end------------\n")
        return rv

    request.addfinalizer(fin)
コード例 #2
0
def global_function_hook(request):
    trace("\n----------global test start------------\n")
    stf.fixture_callback(request, "function", False)
    yield
    stf.fixture_callback(request, "function", True)
    trace("\n----------global test end------------\n")
コード例 #3
0
 def fin():
     rv = stf.fixture_callback(request, "module", True)
     trace("\n----------global module end------------\n")
     return rv
コード例 #4
0
def global_session_request(request):
    trace("\n----------global session start------------\n")
    stf.fixture_callback(request, "session", False)
    yield
    stf.fixture_callback(request, "session", True)
    trace("\n----------global session end------------\n")