doublex 1.8.2

Python test doubles

Powerful test doubles framework for Python

[ install | docs | changelog | sources | issues | PyPI | buildbot ]

a trivial example

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.

Features

  • doubles have not public API framework methods. It could cause silent misspelling.
  • doubles do not require collaborator instances, just classes, and it never instantiate them.
  • assert_that() is used for ALL assertions.
  • mock invocation order is relevant by default.
  • supports old and new style classes.
  • supports Python versions: 2.6, 2.7, 3.2, 3.3, 3.4

Debian

GPLv3

Author

David Villa Alises

Pip

doublex==1.8.2

Classifiers

  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python :: 2.6
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.2
  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 3.1
  • Programming Language :: Python :: 3.4
  • License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
  • Topic :: Software Development
  • Topic :: Software Development :: Testing
  • Topic :: Software Development :: Quality Assurance
File Type Python Version Uploaded On Downloads
doublex-1.8.2.tar.gz Source Nov. 26, 2014 4,327
Version Release Date
1.8.2 Nov. 26, 2014
1.8.1 Jan. 7, 2014
1.8a Jan. 1, 2014
1.7.3 Nov. 28, 2013
1.7.2 Nov. 7, 2013
1.7.1 Oct. 28, 2013
1.7 July 14, 2013
1.6.6 April 27, 2013
1.6.5 April 25, 2013
1.6.4 April 20, 2013
1.6.1 Feb. 4, 2013
1.6 Jan. 30, 2013
1.5.1 Oct. 28, 2012
1.5 Oct. 8, 2012
0.6.3 Oct. 3, 2012
0.5 Sept. 10, 2012
0.4 Sept. 4, 2012
0.3 Sept. 3, 2012
0.2 Aug. 17, 2012
Date Package Version Action
Aug. 24, 2015, 11:07 p.m. doublex 1.7.1 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.8.1 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.7.3 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.6.5 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.6.4 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.8.2 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.6.6 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.6.1 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 0.6.3 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.7.2 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 0.4 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.5.1 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 0.2 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 0.3 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 0.5 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.8a Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.7 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.6 Release Created
Aug. 24, 2015, 11:07 p.m. doublex 1.5 Release Created
Aug. 24, 2015, 11:07 p.m. doublex Package Created