-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documentation finished, tox command to build it, badge in README.rst
- Loading branch information
Krzysztof Laskowski
committed
Dec 22, 2016
1 parent
638d5d6
commit eea2c75
Showing
5 changed files
with
97 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
pytest-logger | ||
=================================== | ||
|
||
The pytest-logger is a pytest plugin which handles logs emitted | ||
with Python's logging module. Logs are output to terminal or files | ||
The pytest-logger is a `pytest`_ plugin which handles logs emitted | ||
by Python's `logging`_ module. Logs are output to terminal or files | ||
in configurable manner. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
overview | ||
usage | ||
|
||
.. _`pytest`: http://docs.pytest.org | ||
.. _`logging`: https://docs.python.org/2/library/logging.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,51 @@ | ||
Overview | ||
=================================== | ||
|
||
todo | ||
Installation | ||
-------------------- | ||
|
||
As simple as:: | ||
|
||
$ [sudo] pip install pytest-logger | ||
|
||
Project is hosted on github: | ||
|
||
https://github.com/aurzenligl/pytest-logger | ||
|
||
Rationale | ||
-------------------- | ||
|
||
I work with C++ application which logs copiously on its own and has multiple interfaces on which | ||
interesting events occur. Getting all this information as separate files in directory tree | ||
or filtered real-time logs proves to be invaluable in testing. | ||
|
||
Unfortunately, contemporary state of pytest and plugins doesn't allow to do this out-of-the-box: | ||
|
||
- real-time output to terminal which doesn't mix with regular pytest output ('-v' or not) | ||
- possibility to enable and set levels on per logger basis | ||
- test session logs persistent in filesystem and partitioned in fine-grained manner | ||
(per testcase and per logger) | ||
|
||
Above problems require reacting on events such as session start, test start/teardown | ||
and inspecting some data stored by framework, e.g. test locations/names. This requires | ||
writing pytest plugin. | ||
|
||
Plugin has a hook API, which means that if user doesn't implement hooks, nothing happens, | ||
and if he does - any cmdline options and logging configuration logic may be envisioned. | ||
|
||
Contributing | ||
-------------------- | ||
|
||
Contibutions are welcome! | ||
|
||
If you: | ||
|
||
- find a bug in plugin, | ||
- find important features missing, | ||
- want to propose a new feature, | ||
- or just like it, | ||
|
||
please write to `github issues`_ or let me know `via email`_. | ||
|
||
.. _`github issues`: https://github.com/aurzenligl/pytest-logger/issues | ||
.. _`via email`: https://github.com/aurzenligl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters