Skip to main content
Latest PyPI version License Supported Python Versions GitHub Actions CI status

Powerful test doubles framework for Python

[ install | docs | changelog | sources | issues | PyPI | github clone ]

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: 3.6, 3.7, 3.8, 3.9, 3.10

Debian

  • amateur repository: deb https://uclm-arco.github.io/debian sid main (always updated)

  • official package (may be outdated)

  • official ubuntu package

  • debian dir: svn://svn.debian.org/svn/python-modules/packages/doublex/trunk

Metadata

Release files for doublex 1.9.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doublex 1.9.6.1
File Size Uploaded Provenance Actions
doublex-1.9.6.1.tar.gz 15.7 kB Without provenance Details for doublex-1.9.6.1.tar.gz

Release files / doublex-1.9.6.1.tar.gz

Download URL doublex-1.9.6.1.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
48fbc633598eb913a6eb0c4694f8c040ba57bae9653d45643a84243e0c9f3268
BLAKE2b-256 checksum
How to use checksums
fe3d0edaecbafa90c19530739467a5dd02c8ebf9968201ab1ff15537ea98422f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

Security for doublex 1.9.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page