diff --git a/ipatests/pytest.ini b/ipatests/pytest.ini index d2355d961..ed462c37a 100644 --- a/ipatests/pytest.ini +++ b/ipatests/pytest.ini @@ -1,2 +1,19 @@ +# pytest configuration + +# This file lives in ipatests/pytest.ini, so it can be included by setup.py, +# and it's symlinked from the project's root directory, so py.test finds it +# when called with no arguments. + [pytest] python_classes = test_ Test +addopts = --doctest-modules + # Ignore files for doc tests. + # TODO: ideally, these should all use __name__=='__main__' guards + --ignore=setup.py + --ignore=setup-client.py + --ignore=checks/check-ra.py + --ignore=daemons/ipa-otpd/test.py + --ignore=doc/examples/python-api.py + --ignore=install/share/copy-schema-to-ca.py + --ignore=install/share/wsgi.py + --ignore=ipapython/py_default_encoding/setup.py diff --git a/ipatests/setup.py.in b/ipatests/setup.py.in index 7f041465c..658a330d8 100644 --- a/ipatests/setup.py.in +++ b/ipatests/setup.py.in @@ -66,6 +66,7 @@ def setup_package(): classifiers=filter(None, CLASSIFIERS.split('\n')), package_dir = {'ipatests': ''}, packages = ["ipatests", + "ipatests.pytest_plugins", "ipatests.test_cmdline", "ipatests.test_install", "ipatests.test_integration", @@ -78,6 +79,7 @@ def setup_package(): "ipatests.test_xmlrpc"], scripts=['ipa-run-tests', 'ipa-test-config', 'ipa-test-task'], package_data = { + 'ipatests': ['pytest.ini'], 'ipatests.test_install': ['*.update'], 'ipatests.test_integration': ['scripts/*'], 'ipatests.test_pkcs10': ['*.csr'], diff --git a/pytest.ini b/pytest.ini new file mode 120000 index 000000000..e87991b0f --- /dev/null +++ b/pytest.ini @@ -0,0 +1 @@ +ipatests/pytest.ini \ No newline at end of file