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 - nextail/python-doublex: Python test doubles library

This repository was archived by the owner on May 27, 2025. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

389 Commits
389 Commits

Folders and files

NameName
Last commit message
Last commit date
debian
debian
 
 
docs
docs
 
 
doctests
doctests
 
 
doublex
doublex
 
 
pydoubles-site
pydoubles-site
 
 
slides
slides
 
 
.gitignore
.gitignore
 
 
.ian
.ian
 
 
.travis.yml
.travis.yml
 
 
BUGS
BUGS
 
 
CHANGES.rst
CHANGES.rst
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
Makefile
Makefile
 
 
README.rst
README.rst
 
 
ToDo
ToDo
 
 
doublex.svg
doublex.svg
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
tox.ini
tox.ini
 
 
version.py
version.py
 
 

Repository files navigation

Latest PyPI version

License

Supported Python Versions Travis CI status

Powerful test doubles framework for Python

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

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.3, 3.4, 3.5. 3.6, 3.7

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

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

About

Python test doubles library

pypi.org/project/doublex/

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

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.