学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2011年6月13日

摘要: pytest Democonftest.py# -*- coding: utf-8 -*-import threadingimport subprocessimport timeimport pytestdef run_with_timeout(timeout = None): def _decorator(f): def _wrapper(*args, **kwargs): def _f(*args, **kwargs): try: _result = f(*args, **kwargs) except Exception , e: thread._exception = e else: t 阅读全文
posted @ 2011-06-13 15:37 Jerry.Kwan 阅读(721) 评论(0) 推荐(0) 编辑