doublex 1.9.6.1
pip install doublex
Released:
Python test doubles
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU General Public License v3 or later (GPLv3+) (GPLv3)
- Author: David Villa Alises, David Pärsson
- Tags unit tests, doubles, stub, spy, mock
- Requires: Python >=3.6
Classifiers
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
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)
debian dir: svn://svn.debian.org/svn/python-modules/packages/doublex/trunk
related
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU General Public License v3 or later (GPLv3+) (GPLv3)
- Author: David Villa Alises, David Pärsson
- Tags unit tests, doubles, stub, spy, mock
- Requires: Python >=3.6
Classifiers
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file doublex-1.9.6.1.tar.gz
.
File metadata
- Download URL: doublex-1.9.6.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48fbc633598eb913a6eb0c4694f8c040ba57bae9653d45643a84243e0c9f3268 |
|
MD5 | a5e1446f72cefa02fc28a533ae1bc050 |
|
BLAKE2b-256 | fe3d0edaecbafa90c19530739467a5dd02c8ebf9968201ab1ff15537ea98422f |