当前位置: 首页>>代码示例>>Python>>正文


Python pytestemb.add_test_case函数代码示例

本文整理汇总了Python中pytestemb.add_test_case函数的典型用法代码示例。如果您正苦于以下问题:Python add_test_case函数的具体用法?Python add_test_case怎么用?Python add_test_case使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了add_test_case函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: deep_02



import pytestemb as test


def deep_02():
    0/0

def deep_01():
    deep_02()



def deep_00():
    deep_01()

    

if __name__ == "__main__":
    
    
    test.add_test_case(deep_00)
    test.run_script()

    

    


开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:21,代码来源:script_exception_02.py

示例2: stop

def stop():
    if test.get_case_name() == "cleanup":
        pass
    else:
        raise Exception("")





if __name__ == "__main__":
    
    
    test.set_setup(start)
    test.add_test_case(a)
    test.add_test_case(b)
    test.set_cleanup(stop)
    test.run_script()

    
    
    
    
    
    
    
    
    
    
开发者ID:biluti,项目名称:pytestemb,代码行数:18,代码来源:script_get_name.py

示例3: start

        
def start():
    pass

def stop():
    pass





if __name__ == "__main__":
    
    
    test.set_setup(start)
    test.add_test_case(level_3)
    test.add_test_case(level_2)
    test.add_test_case(level_1)
    test.set_cleanup(stop)
    test.run_script()

    
    
    
    
    
    
    
    
    
    
开发者ID:biluti,项目名称:pytestemb,代码行数:19,代码来源:script_traceback.py

示例4:

    @coverage    :: 
    @warning     :: 
    """
    test.assert_true(1==1, "1==1")
    test.assert_true(1==1, "1==1")







if __name__ == "__main__":
    
    
    test.add_test_case(case_01)
    test.add_test_case(case_02)
    test.run_script()

    
    
#    import cProfile 
#    cProfile.run('test.run_script()')
#    
    
    
    
    
    
    
    
开发者ID:biluti,项目名称:pytestemb,代码行数:24,代码来源:script_doc.py

示例5: test_assert_equal

def test_assert_equal():
    for val1 in vector:
        for val2 in vector:
            test.assert_equal(val1, val2, "equal")




    


if __name__ == "__main__":

    test.add_trace(["txt"])
    test.add_test_case(test_assert)
    test.add_test_case(test_trace)
    test.add_test_case(test_assert_equal)
    test.run_script()











开发者ID:gburet,项目名称:pytestemb,代码行数:18,代码来源:script_encoding.py

示例6: start

        
def start():
    pass

def stop():
    pass





if __name__ == "__main__":
    
    
    test.set_setup(start)
    test.add_test_case(case_0)
    test.add_test_case(case_1)
    test.set_cleanup(stop)
    test.run_script()

    
    
    
    
    
    
    
    
    
    
开发者ID:biluti,项目名称:pytestemb,代码行数:18,代码来源:script_success_02.py

示例7: start

    test.assert_equal(1, 1)
    test.assert_true(1==1, "1==1")



def start():
    pass

def stop():
    pass


if __name__ == "__main__":
    
    
    test.add_test_case(defaultValue)
    test.set_cleanup(stop)
    test.set_cleanup(stop)    
    test.run_script()

    
    
    
    
    
    
    
    
    

开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:19,代码来源:script_rules_02.py

示例8: case_msg_txt

def case_msg_txt():
    test.assert_true(1==1, "1==1")

def case_msg_int():
    test.assert_true(1==1, 1)






if __name__ == "__main__":
    
    
    test.add_test_case(case_msg_txt)
    test.add_test_case(case_msg_int)
    test.run_script()

    
    
    
    
    
    
    
    
    
    

开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:17,代码来源:script_format.py

示例9:

        test.trace_json(obj)    
        v = random.randint(0, 10)
        obj = {"time_perf":(35 + v), "product":"C"}
        test.trace_json(obj)    
        
        v = random.randint(0,80)
        obj = {"time_perf":v, "product":"D"}
        test.trace_json(obj)  


if __name__ == "__main__":
    
    
    test.add_trace(["txt", "logstash", "octopylog"])

    test.add_test_case(test_json)
        
    test.run_script()












开发者ID:biluti,项目名称:pytestemb,代码行数:18,代码来源:script_tracejson_01.py

示例10: range

    """
    @goal : -
    @coverage : -
    """
    for i in range(0,10):
        test.trace_script("%d" % i)
        time.sleep(60)





if __name__ == "__main__":
    
    test.set_doc(__doc__)
    test.add_test_case(wait_long_time)
    test.run_script()

    
    
    
    
    
    
    
    
    
    


开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:17,代码来源:script_infinite_loop.py

示例11: test_parsing

def test_parsing():
    
    import sys
    sys.stdout.write("ASSERT_OK={'info':'assert_ok_01'")

    





if __name__ == "__main__":


    test.add_test_case(test_parsing)
    test.run_script()













开发者ID:biluti,项目名称:pytestemb,代码行数:16,代码来源:script_parsing_issue.py

示例12: case_09

    test.assert_true(1==1, "1==1")
    test.assert_true(1==2, "1==2")
            
def case_09():
    test.assert_true(1==1, "1==1")
    test.assert_true(1==2, "1==2")
    
def case_10():
    test.assert_true(1==1, "1==1")
    test.assert_true(1==2, "1==2")
            

if __name__ == "__main__":
    
    
    test.add_test_case(case_01)
    test.add_test_case(case_02)
    test.add_test_case(case_03)
    test.add_test_case(case_04)
    test.add_test_case(case_05)
    test.add_test_case(case_06)
    test.add_test_case(case_07)
    test.add_test_case(case_08)
    test.add_test_case(case_09)
    test.add_test_case(case_10)    
    
    
    test.run_script()

    
    
开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:28,代码来源:script_cases.py

示例13: range

    
    for i in range(0,32):
        test.trace_script("Loop %d" % i)
        echo.send("AABB%d" % i)
        rx = echo.receive()
        test.assert_true(rx=="AABB%d" % i)






if __name__ == "__main__":
    
    test.set_setup(setup)
    test.add_test_case(check_io)
    test.run_script()

    
    
    
    
    
    
    
    
    
    


开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:16,代码来源:script_io_echo.py

示例14: test_warning

# -*- coding: UTF-8 -*-




import pytestemb as test



import mock



def test_warning():
    test.warning("warm")

        

if __name__ == "__main__":
    
    
    test.add_trace(["txt", "logstash", "octopylog"])

    test.add_test_case(test_warning)
        
    test.run_script()


开发者ID:biluti,项目名称:pytestemb,代码行数:26,代码来源:script_warning_01.py

示例15: test_exception1


import pytestemb as test


def test_exception1():
    raise Exception("abcééé".encode("latin_1"))

def test_exception2():
    raise Exception("\xC3")

def test_exception3():
    s = ""
    s += "\xC3"


if __name__ == "__main__":
    
    
    test.add_trace(["txt"])
    test.add_test_case(test_exception1)
    test.add_test_case(test_exception2)
    test.add_test_case(test_exception3)
    test.run_script()

    

    


开发者ID:biluti,项目名称:pytestemb,代码行数:22,代码来源:script_exception_encoding.py


注:本文中的pytestemb.add_test_case函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。