Auxiliary library for writing tests
Project description
vutils-testing: Auxiliary library for writing tests
This package provides a set of functions and classes shared across various repositories within test code.
Installation
To install the package, type
$ pip install vutils-testing
Usage
Following code snippets demonstrate how to use the package.
The method TestCase.assert_called_with
asserts that the mock object has been
called once with the specified arguments and then resets it:
import unittest.mock
from vutils.testing import TestCase
class ExampleTestCase(TestCase):
def test_assert_called_with(self):
mock = unittest.mock.Mock()
mock.foo(1, 2, bar=3)
self.assert_called_with(mock, 1, 2, bar=3)
mock.foo(4)
self.assert_called_with(mock, 4)
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
vutils-testing-0.1.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for vutils_testing-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d624f0ffd2bcb86f1251d6bc352ce9a5139e29e278ff6d92db67c989a31607b2 |
|
MD5 | 61d4decc6aee09d9dd8065ddabde4843 |
|
BLAKE2b-256 | a8cf969dff74cf9dd3c4bceb6451876847410df7f47d2c7142de0ea6ebe2275c |