2
2
pytest-qt
3
3
=========
4
4
5
- pytest-qt is a `pytest `_ plugin to allow
6
- programmers write tests for `PySide `_ and
7
- `PyQt `_ applications.
5
+ pytest-qt is a `pytest `_ plugin to allow programmers write tests for `PySide `_ and `PyQt `_ applications.
8
6
9
7
The main usage is to use the `qtbot ` fixture, responsible for handling `qApp `
10
8
creation as needed and provides methods to simulate user interaction,
11
9
like key presses and mouse clicks::
12
10
13
- .. _PySide : https://pypi.python.org/pypi/PySide
14
- .. _PyQt : http://www.riverbankcomputing.com/software/pyqt
15
- .. _pytest : http://pytest.org
16
11
17
12
def test_hello(qtbot):
18
13
widget = HelloWidget()
@@ -24,6 +19,10 @@ like key presses and mouse clicks::
24
19
assert window.greet_label.text() == 'Hello!'
25
20
26
21
22
+ .. _PySide : https://pypi.python.org/pypi/PySide
23
+ .. _PyQt : http://www.riverbankcomputing.com/software/pyqt
24
+ .. _pytest : http://pytest.org
25
+
27
26
This allows you to test and make sure your view layer is behaving the way you expect after each code change.
28
27
29
28
|version | |downloads | |ci |
@@ -58,13 +57,13 @@ Full documentation and tutorial available at `Read the Docs`_.
58
57
Change Log
59
58
----------
60
59
61
- Please consult the `releases page `.
60
+ Please consult the `releases page `_ .
62
61
63
62
.. _releases page : https://github.com/nicoddemus/pytest-qt/releases
64
63
65
64
Bugs/Requests
66
65
-------------
67
66
68
- Please report any issues or feature requests in the `issue tracker `.
67
+ Please report any issues or feature requests in the `issue tracker `_ .
69
68
70
69
.. _issue tracker : https://github.com/nicoddemus/pytest-qt/issues
0 commit comments