The following forum message was posted by at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4543888:
I've recently started using unittest2 to test my Python 2.6 project, because I want the new testing features from Python 2.7's unittest (unittest2 is a backport). However, it appears that Pydev's test runner ignores my "if __name__ == '__main__': unittest2.main()" block, and runs the regular unittest.main() function instead. This ends up breaking a bunch of the unittest2 functionality, and I'd really like to know how to get around that. I can make the code work by running the module as a regular "Python run" instead of "Python unit-test", but I can't do that for more than one module at a time (as far as I know). Since my code shop's standard pre-deploy testing procedure is to right-click the project in the package explorer and choose "Run As > Python unit-test", I need my code to work properly when batch executed like that. ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users