Skip to content

Commit c1e82cb

Browse files
authored
Update README.md
1 parent af3c011 commit c1e82cb

File tree

1 file changed

+16
-54
lines changed

1 file changed

+16
-54
lines changed

README.md

Lines changed: 16 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
versions](https://img.shields.io/pypi/pyversions/pytest-echo.svg)](https://pypi.org/project/pytest-echo/)
66
[![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)
77
[![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+
811

912

1013
Print environment variables, package version and generic attributes,
@@ -24,7 +27,7 @@ install via::
2427

2528
## Dump environment variables
2629

27-
.. code-block:: sh
30+
2831

2932
$ pytest --echo-env=HOME
3033
============================= test session starts =========================
@@ -35,7 +38,7 @@ install via::
3538

3639
## Dump package version
3740

38-
.. code-block:: sh
41+
3942

4043
$ pytest --echo-version=pytest_echo
4144
============================= test session starts =========================
@@ -44,35 +47,32 @@ install via::
4447
pytest_echo: 0.1
4548
plugins: echo, pydev, cov, cache, django
4649

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
5256
5357
## Dump attributes
5458

55-
.. code-block:: sh
56-
5759
$ pytest --echo-attr=django.conf.settings.DEBUG
5860
============================= test session starts =========================
5961
platform linux2 -- Python 2.7.4 -- py-1.4.22 -- pytest-2.6.0 -- /bin/python
6062
Inspections
6163
django.conf.settings.DEBUG: False
6264
plugins: echo, pydev, cov, cache, django
6365

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.
6769
68-
.. note:: You cannot dump callable result.
70+
> [!NOTE] You cannot dump callable result.
6971
7072
## Configure via tox.ini/setup.cfg/pytest.cfg
7173

7274
Example of use in a django project:
7375

74-
.. code-block:: ini
75-
7676
[pytest]
7777
addopts = -vvv
7878
--tb=short
@@ -85,7 +85,7 @@ Example of use in a django project:
8585
--echo-version pytest-echo
8686
--echo-attr django.conf.settings.DATABASES.default.ENGINE
8787

88-
.. code-block:: sh
88+
8989

9090
$ pytest
9191
============================= test session starts =========================
@@ -111,51 +111,13 @@ Example of use in a django project:
111111
Starting from version 1.5, is possible to glob packages version and environment variables,
112112
as:
113113

114-
.. code-block:: sh
115114

116115
$ pytest --echo-version=pytest-* --echo-env=VIRTUAL*
117116

118117
or
119118

120-
.. code-block:: ini
121119

122120
[pytest]
123121
addopts = -vvv
124122
--echo-env VIRTUAL*
125123
--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

Comments
 (0)