[wingide-users] problem with django unit test
Wingware Support
support at wingware.com
Mon Sep 24 12:16:40 EDT 2012
brian downing wrote:
>
> When I run a unit test on a single file, I get the exception
> “ImportError: cannot import name MigrateAndSyncCommand” for
> run_djangotests_xml.py line 195.
>
>
> I think the line should be “from south.management.commands import
> MigrateAndSyncCommand”
>
>
> I'm using south 0.7.6 w/ python 2.7.
>
This may be something that's changed in South. Does correcting that line
in run_djangotests_xml.py solve it for you?
Actually the following would be better, so both variants are supported:
try:
from south.management.commands.test import MigrateAndSyncCommand
except ImportError:
from south.management.commands import MigrateAndSyncCommand
Thanks for reporting this,
--
Stephan Deibel
Wingware | Python IDE
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list