A pytest plugin to trace resource leaks.
Project description
pytest-leaks - A pytest plugin to trace resource leaks
======================================================
.. image:: https://badge.fury.io/py/pytest-leaks.svg
:target: https://badge.fury.io/py/pytest-leaks
:alt: See Package Info on PyPI
.. image:: https://travis-ci.org/abalkin/pytest-leaks.svg?branch=master
:target: https://travis-ci.org/abalkin/pytest-leaks
:alt: See Build Status on Travis CI
.. image:: https://ci.appveyor.com/api/projects/status/github/abalkin/pytest-leaks?branch=master
:target: https://ci.appveyor.com/project/abalkin/pytest-leaks/branch/master
:alt: See Build Status on AppVeyor
A pytest plugin to trace resource leaks.
Usage
-----
To add a leaks test to your py.test session, add the ``-R`` option on the command line::
cat test_fauset.py
drops = []
def test_leaky_fauset():
drops.append({})
def test_broken_fauset():
assert 0
def test_mended_fauset():
assert 1
Features
--------
* Detects memory leaks by running py.test tests repeatedly and comparing total reference
counts between the runs.
Requirements
------------
* py.test version >= TBD;
* A debug build of Python 3.5.
Installation
------------
You can install "pytest-leaks" via `pip`_ from `PyPI`_::
$ pip install pytest-leaks
Usage
-----
* TODO
Contributing
------------
Contributions are very welcome. Tests can be run with `tox`_, please ensure
the coverage at least stays the same before you submit a pull request.
License
-------
Distributed under the terms of the `MIT`_ license, "pytest-leaks" is free and open source software.
Issues
------
If you encounter any problems, please `file an issue`_ along with a detailed description.
Acknowledgements
----------------
This `Pytest`_ plugin was initially generated with `Cookiecutter`_ along with `@hackebrot`_'s
`Cookiecutter-pytest-plugin`_ template.
.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter
.. _`@hackebrot`: https://github.com/hackebrot
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin
.. _`file an issue`: https://github.com/abalkin/pytest-leaks/issues
.. _`pytest`: https://github.com/pytest-dev/pytest
.. _`tox`: https://tox.readthedocs.io/en/latest/
.. _`pip`: https://pypi.python.org/pypi/pip/
.. _`PyPI`: https://pypi.python.org/pypi
======================================================
.. image:: https://badge.fury.io/py/pytest-leaks.svg
:target: https://badge.fury.io/py/pytest-leaks
:alt: See Package Info on PyPI
.. image:: https://travis-ci.org/abalkin/pytest-leaks.svg?branch=master
:target: https://travis-ci.org/abalkin/pytest-leaks
:alt: See Build Status on Travis CI
.. image:: https://ci.appveyor.com/api/projects/status/github/abalkin/pytest-leaks?branch=master
:target: https://ci.appveyor.com/project/abalkin/pytest-leaks/branch/master
:alt: See Build Status on AppVeyor
A pytest plugin to trace resource leaks.
Usage
-----
To add a leaks test to your py.test session, add the ``-R`` option on the command line::
drops = []
def test_leaky_fauset():
drops.append({})
def test_broken_fauset():
assert 0
def test_mended_fauset():
assert 1
Features
--------
* Detects memory leaks by running py.test tests repeatedly and comparing total reference
counts between the runs.
Requirements
------------
* py.test version >= TBD;
* A debug build of Python 3.5.
Installation
------------
You can install "pytest-leaks" via `pip`_ from `PyPI`_::
$ pip install pytest-leaks
Usage
-----
* TODO
Contributing
------------
Contributions are very welcome. Tests can be run with `tox`_, please ensure
the coverage at least stays the same before you submit a pull request.
License
-------
Distributed under the terms of the `MIT`_ license, "pytest-leaks" is free and open source software.
Issues
------
If you encounter any problems, please `file an issue`_ along with a detailed description.
Acknowledgements
----------------
This `Pytest`_ plugin was initially generated with `Cookiecutter`_ along with `@hackebrot`_'s
`Cookiecutter-pytest-plugin`_ template.
.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter
.. _`@hackebrot`: https://github.com/hackebrot
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin
.. _`file an issue`: https://github.com/abalkin/pytest-leaks/issues
.. _`pytest`: https://github.com/pytest-dev/pytest
.. _`tox`: https://tox.readthedocs.io/en/latest/
.. _`pip`: https://pypi.python.org/pypi/pip/
.. _`PyPI`: https://pypi.python.org/pypi