[wingide-users] Targeting specific Django tests.
support at wingware.com
Tue Jan 22 17:11:48 EST 2013
Alice Bevan–McGregor wrote:
> I'm trying to get test integration working in Wing, but am running
> into a minor problem. My process thus far has been:
> 1. Open one of the modules containing tests.
> 2. Testing → Add Current File
> 3. Testing → Debug → Debug Test at Cursor
> Step 2 appears to work, however step 3 produces an inaccurate
> reference on the manage.py test command line. In my case the
> reference is generated as CampaignBrowserTestCase.testCreateCampaign,
> even though that should really be
> campaign.CampaignBrowserTestCase.testCreateCampaign since the
> application name needs to go first.
> (The test run fails with an exception inside Django's own code in the
> get_app function: "App with label CampaignBrowserTestCase could not be
> Any ideas? I've tried poking around the project file itself but ran
> into many, many references to this test and no idea what to look for.
I'm not certain what would cause this but in general I think the Django
unit test support relies on using manage.py to discover tests, rather
than adding them individually.
It might be possible to fix this by altering the sources of the Django
test runner. You can see the sources in src/testing/runners in your
Wing installation. To work with them you would copy the source into
bin/2.5/src/testing/runners and mess around with it or add diagnostics.
You can place breakpoints in tests and debug the tests from the Testing
tool and then should be able to go up the stack into the runner code.
If this doesn't help please let us know which version of Django this is.
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users