test_builtins.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:packaging 作者: blockstack 项目源码 文件源码
def test_baddecorator(self):
        data = 'The quick Brown fox Jumped over The lazy Dog'.split()
        self.assertRaises(TypeError, sorted, data, None, lambda x,y: 0)

# def _run_unittest(*args):
#     # with check_py3k_warnings(
#     #         (".+ not supported in 3.x", DeprecationWarning),
#     #         (".+ is renamed to imp.reload", DeprecationWarning),
#     #         ("classic int division", DeprecationWarning)):
#     if True:
#         run_unittest(*args)
# 
# def test_main(verbose=None):
#     test_classes = (BuiltinTest, TestSorted)
# 
#     _run_unittest(*test_classes)
# 
#     # verify reference counting
#     if verbose and hasattr(sys, "gettotalrefcount"):
#         import gc
#         counts = [None] * 5
#         for i in xrange(len(counts)):
#             _run_unittest(*test_classes)
#             gc.collect()
#             counts[i] = sys.gettotalrefcount()
#         print(counts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号