简体   繁体   中英

How to run django tests in Eclipse to make debugging possible, but on test database

I've got problem concerning me a long time. I either run tests from eclipse (Python unittest) using Pydev or Nose test runner. That way it's possible to debug tests and watch them in PyUnit view. But that way test database is not created, manage.py is not used.

Or I run them via manage.py test - test db is being created, but above features not available that way.

Is that possible to debug tests in eclipse which are being run on test db?

Regards, okrutny

You can create a new PyDev django debug configuration in eclipse and set the program arguments to 'test'.

In this case, the debug configuration will execute the following command: `python manage.py test' and your breakpoints inside test cases will get hit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM