有没有办法将Django的单元测试与Eclipse中的PyUnit挂钩? [英] Is there a way to hook Django's unittest into PyUnit in eclipse?

查看:122
本文介绍了有没有办法将Django的单元测试与Eclipse中的PyUnit挂钩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去几周来一直在Django项目上工作,航程相当顺利。我使用Django的 unittest 库来测试所有内容,结果显示在控制台中。



然而,一些研究,看起来像pydev提供了 PyUnit 的设施。我使用Eclipse,我以为我只是能够将单元测试管理到PyUnit中,但是我没有任何运气或找到文档来执行。



如何在eclipse中的PyUnit视图中运行单元测试?



目前,我使用以下内容在eclipse中运行我的所有测试: p>

  manage.py test 

谢谢!

解决方案

我建议使用鼻子进行django测试。
Pydev允许您选择您的测试运行器,它具有支持鼻子。



我会让堆栈解释为什么以及如何将鼻子与eclipse 集成在一起,进行交互式调试。



我会抛出 django -nose


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 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.

这篇关于有没有办法将Django的单元测试与Eclipse中的PyUnit挂钩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆