Debian Codegraph @

doc/tests/plugins.rst

raw
1 :mod:`plugins` – Testsuite plugins
2 ==================================
3
4 .. automodule:: plugins
5
6 The following plugins are provided and enabled:
7
8 .. autosummary::
9
10 .fake_monitor
11 .mock_libudev
12 .travis
13
14
15 :mod:`pytest` namespace
16 ~~~~~~~~~~~~~~~~~~~~~~~
17
18 The plugin adds the following functions to the :mod:`pytest` namespace:
19
20 .. autofunction:: load_dummy
21
22 .. autofunction:: unload_dummy
23
24
25 :mod:`~plugins.fake_monitor` – A fake :class:`Monitor`
26 ------------------------------------------------------
27
28 .. automodule:: plugins.fake_monitor
29
30 .. autoclass:: FakeMonitor
31 :members:
32
33
34 Funcargs
35 ~~~~~~~~
36
37 The plugin provides the following :ref:`funcargs <funcargs>`:
38
39 .. autofunction:: fake_monitor
40
41
42 :mod:`~plugins.mock_libudev` – Mock calls to libudev
43 ----------------------------------------------------
44
45 .. automodule:: plugins.mock_libudev
46
47 .. autofunction:: libudev_list(function, items)
48
49
50 :mod:`~plugins.travis` – Support for Travis CI
51 ----------------------------------------------
52
53 .. automodule:: plugins.travis
54
55
56 Test markers
57 ~~~~~~~~~~~~
58
59 .. attribute:: pytest.mark.not_on_travis
60
61 Do not run the decorated test on Travis CI::
62
63 @pytest.mark.not_on_travis
64 def test_foo():
65 assert True
66
67 ``test_foo`` will not be run on Travis CI.
68
69
70 :mod:`pytest` namespace
71 ~~~~~~~~~~~~~~~~~~~~~~~
72
73 The plugin adds the following functions to the :mod:`pytest` namespace:
74
75 .. autofunction:: is_on_travis_ci
76
77
78 .. _pytest: http://pytest.org