doublex 1.8.1

Python test doubles

Powerful test doubles framework for Python.

design principles

  • doubles should not have public API framework methods. It avoids silent misspelling.
  • doubles do not require collaborator instances, just classes, and it never instantiate them.
  • assert_that() is used for ALL assertions.
  • invocation order for mocks is relevant by default.
  • supports old and new style classes.

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.

GPLv3

Author

David Villa Alises

Pip

doublex==1.8.1

Classifiers

  • Topic :: Software Development :: Testing
  • Topic :: Software Development :: Quality Assurance
  • Topic :: Software Development
  • Programming Language :: Python :: 3.4
  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 3.2
  • Programming Language :: Python :: 3.1
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 2.6
  • Operating System :: OS Independent
  • License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
  • Intended Audience :: Developers
File Type Python Version Uploaded On Downloads
doublex-1.8.1.tar.gz Source Jan. 7, 2014 3,917
Version Release Date
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
Nov. 4, 2014, 2:14 p.m. doublex 1.7.1 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.8.1 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.7.3 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.6.5 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.6.4 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.6.6 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.6.1 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 0.6.3 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.7.2 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 0.4 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.5.1 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 0.2 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 0.3 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 0.5 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.8a Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.7 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.6 Release Created
Nov. 4, 2014, 2:14 p.m. doublex 1.5 Release Created
Nov. 4, 2014, 2:14 p.m. doublex Package Created