GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - davidvilla/python-doublex: Python test doubles library

BranchesTags
Open more actions menu

Latest commit

 

History

478 Commits
478 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
debian
debian
 
 
docs
docs
 
 
doctests
doctests
 
 
doublex
doublex
 
 
pydoubles-site
pydoubles-site
 
 
slides
slides
 
 
.gitignore
.gitignore
 
 
.ian
.ian
 
 
BUGS
BUGS
 
 
CHANGES.rst
CHANGES.rst
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.rst
README.rst
 
 
ToDo
ToDo
 
 
doublex.svg
doublex.svg
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 
unittest.cfg
unittest.cfg
 
 

Repository files navigation

Latest PyPI version

License

Supported Python Versions GitHub Actions CI status

Powerful test doubles framework for Python

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

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

related

  • pyDoubles
  • doublex-expects
  • crate
  • other doubles
  • ludibrio
  • doubles

About

Python test doubles library

pypi.org/project/doublex/

Resources

Readme
GPL-3.0 license
Activity

Stars

12 stars

Watchers

4 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.