如何将参数传递给 tox/py.test 中的测试函数?
How do the arguments are being passed to test functions in tox/py.test?
我正在学习使用 tox 编写测试。如何将参数传递给 tox/py.test 中的测试函数?例如在 test_simple_backup_generation
from tests/test_backup_cmd.py
of django-backup
extension 中有三个参数 tmpdir
, settings
, db
。我不知道他们来自哪里。在 tox 文档中也没有提到这一点。
这些是pytest fixtures provided by pytest-django and pytest itself。
我正在学习使用 tox 编写测试。如何将参数传递给 tox/py.test 中的测试函数?例如在 test_simple_backup_generation
from tests/test_backup_cmd.py
of django-backup
extension 中有三个参数 tmpdir
, settings
, db
。我不知道他们来自哪里。在 tox 文档中也没有提到这一点。
这些是pytest fixtures provided by pytest-django and pytest itself。