.. image:: https://img.shields.io/pypi/v/doublex.png :target: http://pypi.python.org/pypi/doublex :alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/l/doublex.png?maxAge=2592000 :alt: License
.. image:: https://img.shields.io/pypi/pyversions/doublex.png?maxAge=2592000 :target: http://pypi.python.org/pypi/doublex :alt: Supported Python Versions
.. image:: https://travis-ci.org/davidvilla/python-doublex.svg?branch=master :target: https://travis-ci.org/davidvilla/python-doublex :alt: Travis CI status
Powerful test doubles framework for Python
[
install <http://python-doublex.readthedocs.org/en/latest/install.html>
|
docs <http://python-doublex.readthedocs.org/>
|
changelog <http://python-doublex.readthedocs.org/en/latest/release-notes.html>
|
sources <https://bitbucket.org/DavidVilla/python-doublex>
|
issues <https://bitbucket.org/DavidVilla/python-doublex/issues>
|
PyPI <http://pypi.python.org/pypi/doublex>
|
github clone <https://github.com/davidvilla/python-doublex>
|
travis <https://travis-ci.org/davidvilla/python-doublex>
]
.. sourcecode:: python
import unittest from doublex import Spy, assert_that, called
class SpyUseExample(unittest.TestCase): def test_spy_example(self):
# given
spy = Spy(SomeCollaboratorClass)
cut = YourClassUnderTest(spy)
# when
cut.a_method_that_call_the_collaborator()
# then
assert_that(spy.some_method, called())
See more about doublex doubles <http://python-doublex.readthedocs.org/en/latest/reference.html#doubles>
_.
assert_that()
is used for ALL assertions.Debian ^^^^^^
deb https://uclm-arco.github.io/debian sid main
(always updated)official package <http://packages.debian.org/source/sid/doublex>
_ (may be outdated)official ubuntu package <https://launchpad.net/ubuntu/+source/doublex>
_svn://svn.debian.org/svn/python-modules/packages/doublex/trunk
slides <http://arco.esi.uclm.es/~david.villa/python-doublex/slides>
_pyDoubles <http://python-doublex.readthedocs.org/en/latest/pyDoubles.html>
_doublex-expects <https://pypi.python.org/pypi/doublex-expects>
_crate <https://crate.io/packages/doublex/>
_other doubles <http://garybernhardt.github.io/python-mock-comparison/>
_ludibrio <https://pypi.python.org/pypi/ludibrio>
_doubles <https://github.com/uber/doubles>
_.. Local Variables: .. coding: utf-8 .. mode: rst .. mode: flyspell .. ispell-local-dictionary: "american" .. fill-columnd: 90 .. End:
Version | Tag | Published |
---|---|---|
1.9.3 | 1yr ago | |
1.9.2 | 3yrs ago | |
1.9.1 | 4yrs ago | |
1.9.0 | 4yrs ago |