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

Python tests.main函数代码示例

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

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



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

示例1: run

 def run(self):
     from tests import main
     main(
       test_names = self.tests,
       print_only = self.print_only,
       coverage = self.coverage,
     )
开发者ID:wadoon,项目名称:pytagsfs,代码行数:7,代码来源:setup.py


示例2: main

def main():
    MenuDev()
    core_api.bind_to_exit_app_1(simulator.stop)
    tests.main()
开发者ID:xguse,项目名称:outspline,代码行数:4,代码来源:__init__.py


示例3: id

    print id(t._g)
    print t.ident
""" + self.epilogue)
        output, lines = self.launch_subprocess('newmod')
        self.assertEqual(len(lines), 3, "\n".join(lines))
        self.assertEqual(lines[0], lines[1])

    def test_is_alive (self):
        self.write_to_tempfile("newmod", self.prologue + """
    print t.is_alive()
    print t.isAlive()
""" + self.epilogue)
        output, lines = self.launch_subprocess('newmod')
        self.assertEqual(len(lines), 3, "\n".join(lines))
        self.assertEqual(lines[0], "True", lines[0])
        self.assertEqual(lines[1], "True", lines[1])

    def test_is_daemon (self):
        self.write_to_tempfile("newmod", self.prologue + """
    print t.is_daemon()
    print t.isDaemon()
""" + self.epilogue)
        output, lines = self.launch_subprocess('newmod')
        self.assertEqual(len(lines), 3, "\n".join(lines))
        self.assertEqual(lines[0], "True", lines[0])
        self.assertEqual(lines[1], "True", lines[1])


if __name__ == '__main__':
    main()
开发者ID:inercia,项目名称:evy,代码行数:30,代码来源:test_patcher.py


示例4: test_0003_orig_digests

        self.assertItemsEqual(
            [entry.target for entry in self.loaded_pdarchive.patches],
            [entry.target for entry in self.pdarchive.patches])

    def test_0003_orig_digests(self):
        '''Compare `orig_digest` values for each entry'''

        self.assertItemsEqual(
            [entry.orig_digest for entry in self.loaded_pdarchive.patches],
            [entry.orig_digest for entry in self.pdarchive.patches])
        
    def test_0003_dest_digests(self):
        '''Compare `dest_digest` values for each entry'''

        self.assertItemsEqual(
            [entry.dest_digest for entry in self.loaded_pdarchive.patches],
            [entry.dest_digest for entry in self.pdarchive.patches])

    def test_0004_apply_archive(self):
        '''Apply loaded pdar file and validate results
        
        - clone original dataset
        - apply loaded pdar file to cloned dataset
        - filecmp.cmpfiles against destination dataset
        '''
        self._test_apply_pdarchive(self.loaded_pdarchive)
        
        
if __name__ == "__main__":
    tests.main()
开发者ID:jpenney,项目名称:pdar,代码行数:30,代码来源:test_archive_operations.py


示例5: canReadGlobalCfgFile

    tests.out("command|conf test.globalsetting -g -d")
    tests.out("command|conf test.globalsetting=20 -g")
    tests.out("command|conf read -g")
    tests.assertOn(tests.hasOutput("test.globalsetting=20"))
    tests.out("command|conf test.globalsetting -g -d")

def canReadGlobalCfgFile():
    root = tests.get("applocation")
    file = os.path.join(os.path.join(root, ".OpenIDE"), "oi.config")
    tests.out("command|conf read cfgfile -g")
    tests.assertOn(tests.hasOutput(file))

def canReadGlobalCfgPoint():
    cfgfile = os.path.join(tests.get("applocation"), ".OpenIDE")
    tests.out("command|conf read cfgpoint -g")
    tests.assertOn(tests.hasOutput(cfgfile))

def canReadGlobalRootPoint():
    root = tests.get("applocation")
    tests.out("command|conf read rootpoint -g")
    tests.assertOn(tests.hasOutput(root))

def canRemoveGlobalSetting():
    tests.out("command|conf test.globalremovedsetting=34 -g")
    tests.out("command|conf test.globalremovedsetting -g -d")
    tests.out("command|conf read -g")
    tests.assertOn(tests.hasOutput("test.globalremovedsetting=34") == False)

if __name__ == "__main__":
    tests.main("initialized", getTests)
开发者ID:alex1989,项目名称:OpenIDE,代码行数:30,代码来源:conf.command.tests.oi-pkg-tests.py


示例6: run

	def run(self):
		from tests import main
		testprogram = main(module=None, argv=sys.argv[:1], verbosity=2, exit=False)
		if not testprogram.result.wasSuccessful():
			sys.exit(1)
开发者ID:dreamrom,项目名称:retext,代码行数:5,代码来源:setup.py


示例7: getTests

#!/usr/bin/env python
import sys
import os
sys.path.append(os.path.dirname(__file__))
import tests

def getTests():
	return {
		"When running the touch command a file should be created and a goto event should be emitted":
			canRunTouch
	}

def canRunTouch():
	tests.out("command|touch bleh.txt")
	result = False
	file = os.path.join(sys.argv[1], "bleh.txt")
	event = "goto \"" + file + "|0|0\""
	result = tests.hasEvent(event)
	if result:
		result = os.path.exists(file)
	tests.assertOn(result)

if __name__ == "__main__":
	tests.main("initialized|editor", getTests)
开发者ID:acken,项目名称:OpenIDE,代码行数:24,代码来源:touch.command.tests.oi-pkg-tests.py


示例8: run

 def run(self):
     from tests import main
     main()
开发者ID:jowolf,项目名称:evirt,代码行数:3,代码来源:setup.py


示例9: close_db

        cnx.commit()
        # Placed outside of commit to avoid queue lock, if any.
        q.put(cursor.lastrowid)
        close_db(cursor, cnx)

    a_queue = Queue()
    Process(target=run_session_a, args=(a_queue,)).start()
    assert 'A Started' == a_queue.get()  # blocking call

    b_queue = Queue()
    Process(target=run_session_b, args=(b_queue,)).start()
    assert 'B Started' == b_queue.get()  # blocking call

    # Session sync counts, a is issued before b.
    a_session_sc = a_queue.get()
    b_session_sc = b_queue.get()
    print 'a session_sc =', a_session_sc.sync_count
    print 'b session_sc =', b_session_sc.sync_count
    assert a_session_sc.sync_count < b_session_sc.sync_count

    # Product rowid, a is inserted after b.
    a_product_rowid = a_queue.get()
    b_product_rowid = b_queue.get()
    assert a_product_rowid > b_product_rowid


# Run main when commands read either from standard input,
# from a script file, or from an interactive prompt.
if __name__ == "__main__":
    main(__file__)
开发者ID:gavingc,项目名称:TuckerSync,代码行数:30,代码来源:test_sync_count.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python tests.makeUnitCube函数代码示例发布时间:2022-05-27
下一篇:
Python tests.logging_disabled函数代码示例发布时间: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