Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python test doubles

Project Description

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

  • official package (may be outdated)
  • amateur repository: deb http://babel.esi.uclm.es/arco/ sid main (always updated)
  • official ubuntu package
  • debian dir: svn://svn.debian.org/svn/python-modules/packages/doublex/trunk
Release History

Release History

This version
History Node

1.8.4

History Node

1.8.3

History Node

1.8.2

History Node

1.8.1

History Node

1.7.3

History Node

1.7.2

History Node

1.7.1

History Node

1.7

History Node

1.6.6

History Node

1.6.5

History Node

1.6.4

History Node

1.6.1

History Node

1.6

History Node

1.5.1

History Node

1.5

History Node

0.6.3

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
doublex-1.8.4.tar.gz (14.0 kB) Copy SHA256 Checksum SHA256 Source Nov 9, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting