百度空间 | 百度首页 
 
查看文章
 
Fwd: Debugging doctests interactively
2009-02-03 14:44
The artical is at here.

You can use this module to interactive when you are testing with doctest.

There are also some tests in Uliweb, and some of them are implemented by doctest, but some times, it's not easy to inspect the variables, run some other code when you executing the test, and this tool will help me a lot.

It's simple to use, just add below code in your doctest:

    >>> ...
    >>> import interlude
    >>> interlude.interact(locals())
    >>> ...

Remember, you should install interlude first, you can use:

    easy_install interlude

to install it.

类别:Python | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu