[wingide-users] Doctests in 3.1-b3... confused

Wingware Support support at wingware.com
Mon Apr 28 10:36:01 MDT 2008

Thanks for trying the doctest support; this is very helpful to us.

> The first thing I find non-intuitive is that when I open a Python file 
> containing doctests, nothing happens. Most options in the debug menu are 
> grayed out, the "Run Tests" button does nothing. It seems I first have 
> to do Testing > Add current file. I'd expect doctest support to be 
> available on the current file by default.

This is something we'll add in future versions, but right now Wing does 
not analyze files to see if they contain tests.

> Then when I add my file and do "Run all tests" I run into an exception 
> in unittest.py. Unittest? It seems obvious my file contains only 
> doctests. Apparently not. I discovered "Default test framework" in the 
> project settings, and set it to doctest.

Note that you can also set this on a per-file basis in the file 
properties dialog.

> Now testing works and I see a tree structure with the tests in my File. 
> But when I right-click one of the individual tests ("Example #2") in a 
> function's docstring, and select "Goto source", the first line of my 
> file is highlighted instead of the line containing my test.

This and the other gui failures are bugs which we'll look at soon.

> Running all tests takes about 2 seconds, while they're very trivial (see 
> source code below).

What platform are you on?  On my fairly current Windows system, I do see 
this delay but running them in a cmd shell also seems to take maybe a 
second.  I suspect there is overhead here, but it's probably a constant 
amount of overhead per test run; I'll try to see where it's coming from 
in any case.

Thanks again,


More information about the wingide-users mailing list