Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=6113487 By: chphilli
The company I work for uses and loves PyDev and PyDev extensions! One of the features we love is the auto imports and organize imports. Unfortunately, we've run into a slight problem with it recently that makes these features quite frustrating: handling the case when import order matters. In our case, we are trying to write unit tests against our Django backed application. We don't want to use Django's unit test framework (which are really integration or system level tests), but instead use the standard Python unit tests. We've figured out how to "trick" Django into not requiring a database, but it requires that our code to alter Django be imported _before_ anything that relies on any Django code. To do so, we can put the import at the top of our test module, and if we put that import in an "if True:" block, it even works fine when we organize imports. Unfortunately, when a new import is added by the auto-import feature, it's added _above_ our "if True:" block, and any subsequent organize import command causes all the other imports to be shifted up to where this new import is, before our "if True:" block. Is there any way we can get a way to tell PyDev where to add imports on auto import? ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=293649 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users