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)
评论列表
文章目录