Testing with Spies and Mocks
Project description
Bond is a small library that can be used to spy values and mock functions during tests. Spying is a replacement for writing the assertEquals in your test, which are tedious to write and even more tedious to update whem your test setup or code inevitably changes. With Bond, you separate what is being verified, e.g., the variable named output, from what value it should have. This way you can quickly spy several variables, even have structured values such as lists or dictionaries, and these values are saved into an observation log that is saved for future reference. If the test observations are different you have the option to interact with a console or visual tool to see what has changed, and whether the reference set of observations need to be updated.
For more examples please look at:
Project details
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 bond-1.1.0.tar.gz
.
File metadata
- Download URL: bond-1.1.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e75b4c4d2db9976a0e184beac3dc88ad980c70dd930c31d63f9edbc3fc0e315a |
|
MD5 | 3c350e7c38df47ae14d8386d69d1c7a3 |
|
BLAKE2b-256 | 1f8a44d109b528eb219675b6691fd83fc77fd9bf1d8d2bd42e05244d59b54f4f |