How do the arguments are being passed to test functions in tox/py.test?

女生的网名这么多〃 提交于 2019-12-12 02:07:50

问题


I'm learning to write tests with tox. How do the arguments are being passed to test functions in tox/py.test? For example in test_simple_backup_generation from tests/test_backup_cmd.py of django-backup extension there are three arguments tmpdir, settings, db. I don't have any idea where they came from. It's nothing said about this in tox documentation either.


回答1:


These are pytest fixtures provided by pytest-django and pytest itself.



来源:https://stackoverflow.com/questions/39018056/how-do-the-arguments-are-being-passed-to-test-functions-in-tox-py-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!