2
2
pytest-qt
3
3
=========
4
4
5
- pytest-qt is a `pytest < http://pytest.org > `_ plugin to allow
6
- programmers write tests for `PySide < https://pypi.python.org/pypi/PySide > `_ and
7
- `PyQt < http://www.riverbankcomputing.com/software/pyqt > `_ applications.
5
+ pytest-qt is a `pytest `_ plugin to allow
6
+ programmers write tests for `PySide `_ and
7
+ `PyQt `_ applications.
8
8
9
9
The main usage is to use the `qtbot ` fixture, responsible for handling `qApp `
10
10
creation as needed and provides methods to simulate user interaction,
11
11
like key presses and mouse clicks::
12
12
13
+ .. _PySide : https://pypi.python.org/pypi/PySide
14
+ .. _PyQt : http://www.riverbankcomputing.com/software/pyqt
15
+ .. _pytest : http://pytest.org
13
16
14
17
def test_hello(qtbot):
15
18
widget = HelloWidget()
@@ -23,27 +26,45 @@ like key presses and mouse clicks::
23
26
24
27
This allows you to test and make sure your view layer is behaving the way you expect after each code change.
25
28
26
- [](https://crate.io/packages/pytest-qt)
27
- [](https://crate.io/packages/pytest-qt/)
28
- [](https://travis-ci.org/nicoddemus/pytest-qt)
29
+ |version | |downloads | |ci |
29
30
30
- ## Requirements ##
31
+ .. |version | image :: http://img.shields.io/pypi/v/pytest-qt.svg
32
+ :target: https://crate.io/packages/pytest-qt
33
+
34
+ .. |downloads | image :: http://img.shields.io/pypi/dm/pytest-qt.svg
35
+ :target: https://crate.io/packages/pytest-qt
36
+
37
+ .. |ci | image :: http://img.shields.io/travis/nicoddemus/pytest-qt.svg
38
+ :target: https://travis-ci.org/nicoddemus/pytest-qt
39
+
40
+
41
+ Requirements
42
+ ------------
31
43
32
44
Python 2.6 or later, including Python 3+.
33
45
34
- Works with either [PySide](https://pypi.python.org/pypi/PySide) or
35
- [PyQt](http://www.riverbankcomputing.com/software/pyqt), picking one that is available giving
36
- preference to `PySide ` if both are installed (to force it to use `PyQt `, set
37
- the environment variable `PYTEST_QT_FORCE_PYQT=true `).
46
+ Works with either PySide _ or
47
+ PyQt _ picking whichever is available on the system, giving
48
+ preference to ``PySide `` if both are installed (to force it to use ``PyQt ``, set
49
+ the environment variable ``PYTEST_QT_FORCE_PYQT=true ``).
50
+
51
+ Documentation
52
+ -------------
53
+
54
+ Full documentation and tutorial available at `Read the Docs `_.
55
+
56
+ .. _Read The Docs : https://pytest-qt.readthedocs.org/en/latest/
38
57
39
- ## Documentation ##
58
+ Change Log
59
+ ----------
40
60
41
- Full documentation and tutorial available at [Read the Docs](https://pytest-qt.readthedocs.org/en/latest/) .
61
+ Please consult the ` releases page ` .
42
62
43
- ## Change Log ##
63
+ .. _ releases page : https://github.com/nicoddemus/pytest-qt/releases
44
64
45
- Please consult the [releases page](https://github.com/nicoddemus/pytest-qt/releases).
65
+ Bugs/Requests
66
+ -------------
46
67
47
- ## Bugs/Requests ##
68
+ Please report any issues or feature requests in the ` issue tracker `.
48
69
49
- Please report any issues or feature requests in the [issue tracker]( https://github.com/nicoddemus/pytest-qt/issues).
70
+ .. _ issue tracker: https://github.com/nicoddemus/pytest-qt/issues
0 commit comments