summaryrefslogtreecommitdiff
path: root/README
blob: c72e057bec6f9b89bc826cf0960c9f056c3b6e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pytest-runner
=============

Setup scripts can use pytest-runner to add setup.py test support for pytest
runner.

Recommended usage
-----------------

- Add 'pytest-runner' to your 'setup_requires'. Pin to '>=1.0,<2.0dev' (or
  similar) to avoid pulling in incompatible versions.
- Include 'pytest' and any other testing requirements to 'tests_require'.
- Invoke tests with `setup.py ptr`.

Alternate usage
---------------

- Include the file `ptr.py` in your repo.
- Add these lines to your setup.py::

	execfile('ptr.py')
	setup_params = PyTest.install(dict(...))
	setuptools.setup(**setup_params)

  Where '...' are your normal keyword parameters to setup().

- Invoke your tests with setup.py test.

Changes
-------

1.1
~~~

* Added support for --addopts to pass any arguments through to py.test.
* Deprecated support for --junitxml. Use --addopts instead. --junitxml will be
  removed in 2.0.

1.0
~~~

Initial implementation.