[wingide-users] Wing tests not running

Wing IDE Support support at wingware.com
Wed Aug 1 09:58:01 MDT 2012

On 8/1/12 11:40 AM, Murray wrote:
> My tests need to be run from the base directory else they will fail with
> ModuleImportFailure, when they can't find the module they're supposed to
> be testing.
> If this is what is happening, why isn't wing reporting that failure?
> Is there a way to prevent Wing's test runner from changing the execution
> directory?
> Or should I be changing my directory structure somehow?

The issue probably is the current directory.  Wing's test runner was 
designed when the default method of running tests was to put a call to 
unittest.main() in the test file and then to run that file from the 
command line -- which would result in the directory that the file was is 
being added to python's sys.path.

When you run tests outside of Wing, how does the directory for your 
non-test modules get added to sys.path?  One possibility to work around 
Wing's test runner's current limitations is just to add that directory 
to the Python Path via the Project Properties dialog.



More information about the wingide-users mailing list