【发布时间】:2011-06-08 11:05:27
【问题描述】:
我为我的 django 视图写了一个小单元测试。我的项目结构是这样的
项目名称/
apps/
module1/
tests.py
module2/
tests.py
这是我正在使用命令执行测试的目录结构:
$python manage.py test_coverage module1 module2 -v2
然后它很好地执行了测试,但是现在我稍微更改了目录结构,我创建了一个新目录 tests/,因为我保留了所有测试文件
项目名称/
apps/
module1/
tests/
test_basic.py
test_detail.py
现在我可以使用上述相同的命令执行目录中的那些测试,它们是执行此类测试的任何替代方法吗?
【问题讨论】:
标签: python django unit-testing django-unittest