This is whitebox test scripting tool for Python. The idea is to totally rip the function being tested out of context and mock it's entire universe in a script. All of the function's global name space and class name space are gutted (including recursive calls to itself) and replaced by mock objects that simply follow along in the script (no need to explicitly create and configure each mock). Even the "self" object passed to methods is mocked in the script.
This allows you to easily simulate anything that you want to (network disconnects, disk full, hardware failures, etc) and see how your code reacts to it. It also lets you completely test a function before other functions it depends on are written.
This system also allows you to specify a list of alternate values at any point in the script where a value is fed or returned into the function. Multiple points may specify alternate values. The function is called for each combination of values from all points in the script.
The system also supports mocking iterators and generators, as well as testing iterators and generators.
The system is currently in a working state, but still has rough edges. You are invited to make and submit enhancements to it, whether they be smoothing the rough edges or adding new features.
Enjoy!
View full history Series and milestones
trunk series is the current focus of development.
All code Code
- Version control system:
- Bazaar
- Programming languages:
- Python
All packages Packages in Distributions
-
bpython source package in Trusty
Version 0.12-1ubuntu1.1 uploaded -
bpython source package in Precise
Version 0.10.1-3 uploaded