Metadata-Version: 2.1
Name: allows
Version: 0.1.0
Summary: Easier mock configuration and assertions in Python
Home-page: https://github.com/dvndrsn/allows
Author: Dave Anderson
Author-email: dave@dvndrsn.com
License: MIT license
Keywords: allows
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7

======
Allows
======


.. image:: https://img.shields.io/pypi/v/allows.svg
        :target: https://pypi.python.org/pypi/allows

.. image:: https://img.shields.io/travis/dvndrsn/allows.svg
        :target: https://travis-ci.org/dvndrsn/allows

.. image:: https://readthedocs.org/projects/allows/badge/?version=latest
        :target: https://allows.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status


.. image:: https://pyup.io/repos/github/dvndrsn/allows/shield.svg
     :target: https://pyup.io/repos/github/dvndrsn/allows/
     :alt: Updates



Easier mock configuration and assertions in Python using R-spec_-like grammar!

.. code:: python

    allow(my_mock).to(return_value('hi').on_method('wave'))
    allow(my_mock).to(return_value('bye').on_method('wave').when_called_with('see ya'))

    assert my_mock.wave() == 'hi'
    assert my_mock.wave('see ya') == 'bye'

This library is built to wrap and configure Mock, MagicMock and other objects from the built in `unittest.mock`_ available in Python 3.3+.

.. _unittest.mock: https://docs.python.org/3/library/unittest.mock.html

* Free software: MIT license
* Documentation: https://allows.readthedocs.io.


Features
--------

* R-spec_-like grammar for specifing Mock behavior
* Compatible with all Python standard library `unittest.mock`_ Mock (MagicMock, Patch, etc.)
* Stand alone SideEffect builder to model and combine complex side effects

.. _R-spec: https://rspec.info/documentation/3.8/rspec-mocks/

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.1.0 (2019-05-11)
------------------

* First release on PyPI.


