本文整理汇总了Python中test_support.run_unittest函数的典型用法代码示例。如果您正苦于以下问题:Python run_unittest函数的具体用法?Python run_unittest怎么用?Python run_unittest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run_unittest函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: main
def main():
test_support.run_unittest(LockTests, RLockTests, EventTests,
ConditionAsRLockTests, ConditionTests,
SemaphoreTests, BoundedSemaphoreTests,
ThreadTests,
ThreadJoinOnShutdown,
ThreadingExceptionTests,
)
开发者ID:dustyneuron,项目名称:gevent,代码行数:8,代码来源:test_threading_2.py
示例2: test_main
def test_main(verbose=None):
NamedTupleDocs = doctest.DocTestSuite(module=collections)
test_classes = [
TestNamedTuple,
NamedTupleDocs,
TestOneTrickPonyABCs,
TestCollectionABCs,
TestCounter,
TestOrderedDict,
GeneralMappingTests,
SubclassMappingTests,
]
test_support.run_unittest(*test_classes)
test_support.run_doctest(collections, verbose)
开发者ID:gward,项目名称:backport_collections,代码行数:14,代码来源:test_collections.py
示例3: test_main
def test_main(verbose=None):
import sys
test_classes = (TestBasic, TestVariousIteratorArgs, TestSubclass, TestSubclassWithKwargs)
test_support.run_unittest(*test_classes)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in xrange(len(counts)):
test_support.run_unittest(*test_classes)
gc.collect()
counts[i] = sys.gettotalrefcount()
print counts
# doctests
import test_deque
test_support.run_doctest(test_deque, verbose)
开发者ID:gward,项目名称:backport_collections,代码行数:22,代码来源:test_deque.py
示例4: test_main
def test_main():
import sys
test_support.run_unittest(TestSubclasses)
开发者ID:BackupTheBerlios,项目名称:etpe-svn,代码行数:3,代码来源:test_subclasses.py
示例5: test_main
def test_main():
test_support.run_unittest(MessageTestCase)
开发者ID:Bail-jw,项目名称:mediacomp-jes,代码行数:2,代码来源:test_rfc822.py
示例6: test_main
def test_main():
test_support.run_unittest(ImportHooksTestCase)
开发者ID:denis-vilyuzhanin,项目名称:OpenModelSphereMirror,代码行数:2,代码来源:test_importhooks.py
示例7: test_main
def test_main():
test_support.run_unittest(QueueTest, LifoQueueTest, PriorityQueueTest,
FailingQueueTest)
开发者ID:SMFOSS,项目名称:gevent,代码行数:3,代码来源:test_queue.py
示例8: test_main
def test_main():
run_unittest(CommandTests)
开发者ID:denis-vilyuzhanin,项目名称:OpenModelSphereMirror,代码行数:2,代码来源:test_commands.py
示例9: trace
old = None
lst = []
try:
def trace(frame, ev, arg):
lst.append((frame.f_code.co_filename, frame.f_lineno, ev))
six.print_("TRACE: %s:%s %s" % lst[-1])
return trace
with gevent.thread.allocate_lock():
sys.settrace(trace)
finally:
sys.settrace(old)
self.failUnless(lst == [], "trace not empty")
def run_script(self, more_args=[]):
rc = subprocess.call([sys.executable, "-c", script] + more_args)
self.failIf(rc == 2, "interpreter was blocked")
self.failUnless(rc == 0, "Unexpected error")
def test_finalize_with_trace(self):
self.run_script()
def test_bootstrap_inner_with_trace(self):
self.run_script(["1"])
if __name__ == "__main__":
import test_support
test_support.run_unittest(ThreadTrace)
开发者ID:dustyneuron,项目名称:gevent,代码行数:30,代码来源:test__threading_vs_settrace.py
示例10: test_main
def test_main():
test_support.run_unittest(JreloadTestCase)
开发者ID:denis-vilyuzhanin,项目名称:OpenModelSphereMirror,代码行数:2,代码来源:test_jreload.py
示例11: test_main
def test_main():
run_unittest(CodeopTests)
开发者ID:BackupTheBerlios,项目名称:etpe-svn,代码行数:2,代码来源:test_codeop.py
示例12: testall
def testall():
test_support.run_unittest(Test)
开发者ID:SMFOSS,项目名称:gevent,代码行数:2,代码来源:test_socketserver.py
示例13: test_main
def test_main():
run_unittest(GlobTests)
开发者ID:denis-vilyuzhanin,项目名称:OpenModelSphereMirror,代码行数:2,代码来源:test_glob.py
示例14: NetrcTestCase
default login log2 password pass2
"""
temp_filename = tempfile.mktemp()
class NetrcTestCase(unittest.TestCase):
def setUp (self):
fp = open(temp_filename, 'wt')
fp.write(TEST_NETRC)
fp.close()
self.netrc = netrc.netrc(temp_filename)
def tearDown (self):
del self.netrc
os.unlink(temp_filename)
def test_case_1(self):
self.assert_(self.netrc.macros == {'macro1':['line1\n', 'line2\n'],
'macro2':['line3\n', 'line4\n']}
)
self.assert_(self.netrc.hosts['foo'] == ('log1', 'acct1', 'pass1'))
self.assert_(self.netrc.hosts['default'] == ('log2', None, 'pass2'))
if __name__ == "__main__":
test_support.run_unittest(NetrcTestCase)
开发者ID:mancoast,项目名称:CPythonPyc_test,代码行数:28,代码来源:221_test_netrc.py
示例15: test_main
def test_main():
run_unittest(MhlibTests)
开发者ID:doom38,项目名称:jython_v2.2.1,代码行数:2,代码来源:223_test_mhlib.py
示例16: test_main
def test_main():
try:
test_support.run_unittest(DumbDBMTestCase)
finally:
_delete_files()
开发者ID:denis-vilyuzhanin,项目名称:OpenModelSphereMirror,代码行数:5,代码来源:test_dumbdbm.py
示例17: test_main
def test_main():
run_unittest(CompileTests)
开发者ID:BackupTheBerlios,项目名称:etpe-svn,代码行数:2,代码来源:test_jy_compile.py
示例18: test_main
def test_main():
run_unittest(PyclbrTest)
开发者ID:BackupTheBerlios,项目名称:etpe-svn,代码行数:2,代码来源:test_pyclbr.py
示例19: printout
(double)
(double)
(double)
(double)
(float)
(java.io.Serializable)
(java.io.Serializable)
(java.io.Serializable)
(java.io.Serializable)
(java.io.Serializable)
(java.io.Serializable)
(java.lang.Object)
""")
def printout(meth_dict,lbl,rng,args):
for i in rng:
print meth_dict['ov_%s%s' % (lbl,i)](jo,args)
import sys
if __name__ == '__main__' and not sys.argv[1:] == ['break-out']:
try:
import test_support
except ImportError:
unittest.main()
else:
test_support.run_unittest(OverloadedDispatchTests)
开发者ID:Bail-jw,项目名称:mediacomp-jes,代码行数:28,代码来源:test_joverload.py
示例20: test_main
def test_main():
test_support.run_unittest(HTMLParserTestCase)
开发者ID:BackupTheBerlios,项目名称:etpe-svn,代码行数:2,代码来源:test_htmlparser.py
注:本文中的test_support.run_unittest函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论