我正在尝试在 Django 项目中更好地组织我的硒测试。
我有一个文件夹project/app/selenium_tests/
,我在其中放置了一个__init__.py
, 和一个tests.py
包含我的硒测试的文件夹。在__init__.py
我像这样导入测试:
from tests import *
但是当我这样做时,./manage.py test app.selenium_tests
我得到:
ValueError: Test label 'app.selenium_tests' does not refer to a test
我在这里能错过什么?我什至在 selenium_test 包中添加了一个models.py,但没有任何乐趣。
非常感谢任何帮助。