开发者

Is there a way to hook Django's unittest into PyUnit in eclipse?

I've been working on a Django project for the past few weeks now, and it's been fairly smooth sailing. I use Django's unittest library to test everything, and the result show up in the console.

However, after doing some research, it looks like pydev provides facilities for PyUnit. I use Eclipse, and I thought I would just just be able to开发者_如何学JAVA pipe the unit tests into PyUnit, but I haven't had any luck in either that or finding documentation to do so.

How do I have my unit tests run in the PyUnit view in eclipse?

Currently, I run all of my test within eclipse using the following:

manage.py test

Thanks!


I would recommend using Nose for your django tests. Pydev allows you to choose your test runner, and it has support for nose.

I'll let stack explain why and how to integrate nose with eclipse for interactive debugging.

And i'll throw in the django-nose too.


Here's an adapter that lets you use the nose plugin from the django-nose package from the command line. Then you can run your django tests through the Eclipse PyUnit window via nose.

https://github.com/jenniferlianne/django_nose_adapter

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜