• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python pytestemb.add_test_case函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: test_trace

            "\xC3",
            u"\xC3",
            """'353530392d31354133093065450100ea/fs/1/[email protected]`[email protected]`FF4noAu4nnRd4`al54haon', u'ParentId': u'353530392d31354133093065450100ea/fs/1/[email protected]`[email protected]@`RDa44cl8`@`nFooiutn`e', u'Type': u'Item', u'URI': u'http://192.168.4.1:57135/PulsarServerPlugin/i/MzUzNTMwMzkyZDMxMzU0MTMzMDkzMDY1NDUwMTAwZWEvZnMvMS84NG8zcUBtczRob1dgWG4wUGFORG81SGM4bkBgRkY0bm9BdTRublJkNGBhbDU0aGFvbg%3D%3D.mp3', [^] u'Title': u'01 - Assassin'""",
            ]



def test_trace():
    for v in vector:
        test.trace_trace({v:v})


if __name__ == "__main__":

    test.add_trace(["txt"])
    test.add_test_case(test_trace)


    test.run_script()











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


示例17: MyError

import pytestemb as test


class MyError(Exception):
    pass

def ex_01():
    raise IndexError()


def ex_02():
    raise KeyError()

def ex_03():
    raise MyError("test")    

if __name__ == "__main__":
    
    
    test.add_test_case(ex_01)
    test.add_test_case(ex_02)
    test.add_test_case(ex_03)
    test.run_script()

    

    


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


示例18: fail_02

    
def fail_02():
    test.fail("fail")
    test.fail_fatal("fail_fatal")


def tagvalue():
    test.tag_value("tag", "value")




if __name__ == "__main__":
    
    test.set_doc(__doc__)
    test.add_test_case(case_assert_true)
    test.add_test_case(case_assert_false)
    test.add_test_case(case_assert_equal)
    test.add_test_case(case_assert_notequal)
    
    test.add_test_case(warning_01)
    test.add_test_case(warning_02)
    test.add_test_case(warning_03)
    test.add_test_case(fail_01)
    test.add_test_case(fail_02)
    
    test.add_test_case(tagvalue)
    
    
    test.run_script()
开发者ID:gburet,项目名称:pytestemb,代码行数:29,代码来源:script_all.py


示例19: loop


def loop():
    
    for i in range(0,10):
        test.assert_true(1==1, "1==1 loop:%d" % i)
        time.sleep(0.01)





if __name__ == "__main__":
    
    
    test.add_test_case(defaultValue)
    test.add_test_case(boundValue)
    test.add_test_case(loop)
    test.run_script()

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


示例20: test_abort

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




import pytestemb as test



import mock



def test_abort():
    test.abort("")

        

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

    test.add_test_case(test_abort)
        
    test.run_script()


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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python pytestemb.assert_true函数代码示例发布时间:2022-05-27
下一篇:
Python pytest_ringo.transaction_rollback函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap