5
5
versions] ( https://img.shields.io/pypi/pyversions/pytest-echo.svg )] ( https://pypi.org/project/pytest-echo/ )
6
6
[ ![ tests] ( https://github.com/pytest-dev/pytest-echo/actions/workflows/tests.yml/badge.svg )] ( https://github.com/pytest-dev/pytest-echo/actions/workflows/tests.yml )
7
7
[ ![ Downloads] ( https://static.pepy.tech/badge/pytest-echo/month )] ( https://pepy.tech/project/pytest-echo )
8
+ [ ![ Coverage] ( https://codecov.io/gh/pytest-dev/pytest-echo/branch/develop/graph/badge.svg )] ( https://codecov.io/gh/pytest-dev/pytest-echo )
9
+ [ ![ Documentation] ( https://readthedocs.org/projects/pytest-echo/badge/?version=latest )] ( https://pytest-echo.readthedocs.io/en/latest/ )
10
+
8
11
9
12
10
13
Print environment variables, package version and generic attributes,
@@ -24,7 +27,7 @@ install via::
24
27
25
28
## Dump environment variables
26
29
27
- .. code-block:: sh
30
+
28
31
29
32
$ pytest --echo-env=HOME
30
33
============================= test session starts =========================
@@ -35,7 +38,7 @@ install via::
35
38
36
39
## Dump package version
37
40
38
- .. code-block:: sh
41
+
39
42
40
43
$ pytest --echo-version=pytest_echo
41
44
============================= test session starts =========================
@@ -44,35 +47,32 @@ install via::
44
47
pytest_echo: 0.1
45
48
plugins: echo, pydev, cov, cache, django
46
49
47
- .. warning:: The first attempt to retrieve the version is done via setuptools
48
- if it fails, the module is imported (` __import__(package) ` ) to retrieve the version reading
49
- ` get_version ` , ` __version__ ` , ` VERSION ` , ` version ` so any module
50
- level code is executed. This should be not an issue as no problematic code
51
- should be present in the first level of the package
50
+ > [ !NOTE]
51
+ > The first attempt to retrieve the version is done via setuptools
52
+ > if it fails, the module is imported (` __import__(package) ` ) to retrieve the version reading
53
+ > ` get_version ` , ` __version__ ` , ` VERSION ` , ` version ` so any module
54
+ > level code is executed. This should be not an issue as no problematic code
55
+ > should be present in the first level of the package
52
56
53
57
## Dump attributes
54
58
55
- .. code-block:: sh
56
-
57
59
$ pytest --echo-attr=django.conf.settings.DEBUG
58
60
============================= test session starts =========================
59
61
platform linux2 -- Python 2.7.4 -- py-1.4.22 -- pytest-2.6.0 -- /bin/python
60
62
Inspections
61
63
django.conf.settings.DEBUG: False
62
64
plugins: echo, pydev, cov, cache, django
63
65
64
- .. warning:: Be careful when use ` --echo-attr ` . It loads any module in the path and this will
65
- execute any module level code
66
- If you try to dump a property, related ` getter ` will be executed.
66
+ > [ !NOTE ]
67
+ > Be careful when use ` --echo-attr ` . It loads any module in the path and this will execute any module level code
68
+ > If you try to dump a property, related ` getter ` will be executed.
67
69
68
- .. note:: You cannot dump callable result.
70
+ > [ !NOTE ] You cannot dump callable result.
69
71
70
72
## Configure via tox.ini/setup.cfg/pytest.cfg
71
73
72
74
Example of use in a django project:
73
75
74
- .. code-block:: ini
75
-
76
76
[pytest]
77
77
addopts = -vvv
78
78
--tb=short
@@ -85,7 +85,7 @@ Example of use in a django project:
85
85
--echo-version pytest-echo
86
86
--echo-attr django.conf.settings.DATABASES.default.ENGINE
87
87
88
- .. code-block:: sh
88
+
89
89
90
90
$ pytest
91
91
============================= test session starts =========================
@@ -111,51 +111,13 @@ Example of use in a django project:
111
111
Starting from version 1.5, is possible to glob packages version and environment variables,
112
112
as:
113
113
114
- .. code-block:: sh
115
114
116
115
$ pytest --echo-version=pytest-* --echo-env=VIRTUAL*
117
116
118
117
or
119
118
120
- .. code-block:: ini
121
119
122
120
[pytest]
123
121
addopts = -vvv
124
122
--echo-env VIRTUAL*
125
123
--echo-version pytest-*
126
-
127
- ## Links
128
-
129
- +--------------------+-----------------+---------------+----------------+
130
- | Stable | | master-build| | | master-cov| | | master-doc| |
131
- +--------------------+-----------------+---------------+----------------+
132
- | Development | | dev-build| | | dev-cov| | | dev-doc| |
133
- +--------------------+-----------------+---------------+----------------+
134
- | Project home page: | https://github.com/pytest-dev/pytest-echo |
135
- +--------------------+--------------------------------------------------+
136
- | Issue tracker: | https://github.com/pytest-dev/pytest-echo/issues |
137
- +--------------------+--------------------------------------------------+
138
- | CI: | https://travis-ci.org/pytest-dev/pytest-echo |
139
- +--------------------+--------------------------------------------------+
140
- | Download: | https://pypi.org/project/pytest-echo/ |
141
- +--------------------+--------------------------------------------------+
142
- | Documentation: | https://pytest-echo.readthedocs.io/en/latest/ |
143
- +--------------------+--------------------------------------------------+
144
-
145
- .. |master-build| image:: https://travis-ci.org/pytest-dev/pytest-echo.svg?branch=master
146
- :target: https://travis-ci.org/pytest-dev/pytest-echo
147
-
148
- .. |master-cov| image:: https://codecov.io/gh/pytest-dev/pytest-echo/branch/master/graph/badge.svg
149
- :target: https://codecov.io/gh/pytest-dev/pytest-echo
150
-
151
- .. |master-doc| image:: https://readthedocs.org/projects/pytest-echo/badge/?version=stable
152
- :target: https://pytest-echo.readthedocs.io/en/stable/
153
-
154
- .. |dev-build| image:: https://travis-ci.org/pytest-dev/pytest-echo.svg?branch=develop
155
- :target: https://travis-ci.org/pytest-dev/pytest-echo
156
-
157
- .. |dev-cov| image:: https://codecov.io/gh/pytest-dev/pytest-echo/branch/develop/graph/badge.svg
158
- :target: https://codecov.io/gh/pytest-dev/pytest-echo
159
-
160
- .. |dev-doc| image:: https://readthedocs.org/projects/pytest-echo/badge/?version=latest
161
- :target: https://pytest-echo.readthedocs.io/en/latest/
0 commit comments