简体   繁体   English

Django-nose奇怪的输出

[英]Django-nose strange output

I am trying different testing tools for my django project. 我正在为django项目尝试其他测试工具。 I am also new into django and python. 我也是django和python的新手。 I have installed django and django-nose on my virtualenv. 我在virtualenv上安装了django和django-nose。 I edited settings.py file as requested in django-nose documentation. 我按照django-nose文档中的要求编辑了settings.py文件。 When I run my tests with command python manage.py test app I get following output : 当我使用命令python manage.py test app运行测试时,得到以下输出:

Creating test database for alias 'default'...

....

DEBUG 2012-12-17 01:04:20,647 generic (10716) generic.py:261 execute "SET FOREIG
N_KEY_CHECKS=0;" with params "[]"
DEBUG 2012-12-17 01:04:20,661 generic (10716) generic.py:261 execute "SET FOREIG
N_KEY_CHECKS=0;" with params "[]"

....

............F.F.............EEEEEE.EEEEEEE

There is lot of similiar lines with DEBUG at start, I represent them with those 4 dots. 开始时有很多类似DEBUG的相似线,我用这4个点表示它们。 After all those lines follows test report which looks normal. 在所有这些行之后,遵循看起来正常的测试报告。

So question is, is there specific problem with my settings? 所以问题是,我的设置是否存在特定问题? Or is it normal nose output? 还是鼻子输出正常?

app/
    tests/
        __init__.py
        test_one.py
        test_two.py

Place where are my tests stored. 存放我的测试的位置。 init contains test suite. init包含测试套件。

Py.test run my tests without any problems. Py.test运行我的测试没有任何问题。

Thanks for answer. 感谢您的回答。

I found out that this comes from running south and nose at the same time. 我发现,这来自于运行南部鼻子在同一时间。

You can comment out south if that's an option. 如果可以的话,您可以在south注释掉。 If this doesn't work check out this neat solution: 如果这样不起作用,请查看以下整洁的解决方案:

http://pypede.wordpress.com/2012/06/17/disable-south-debug-logging-when-testing-apps-with-nose-in-django/ http://pypede.wordpress.com/2012/06/17/disable-south-debug-logging-when-testing-apps-with-nose-in-django/

My output was similar, but slightly different: 我的输出类似,但略有不同:

execute "SET FOREIGN_KEY_CHECKS=0;" with params "[]"
execute "SET FOREIGN_KEY_CHECKS=0;" with params "[]"
...
execute "SET FOREIGN_KEY_CHECKS=0;" with params "[]"
execute "SET FOREIGN_KEY_CHECKS=0;" with params "[]"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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