Pytest Mock 3.14.0 | Coderz Repository

pytest-mock 3.14.0

Last updated:

0 purchases

pytest-mock 3.14.0 Image
pytest-mock 3.14.0 Images

Free

Languages

Categories

Add to Cart

Description:

pytestmock 3.14.0

This plugin provides a mocker fixture which is a thin-wrapper around the patching API
provided by the mock package:
import os

class UnixFS:

@staticmethod
def rm(filename):
os.remove(filename)

def test_unix_fs(mocker):
mocker.patch('os.remove')
UnixFS.rm('file')
os.remove.assert_called_once_with('file')
Besides undoing the mocking automatically after the end of the test, it also provides other
nice utilities such as spy and stub, and uses pytest introspection when
comparing calls.

Professionally supported pytest-mock is available.

Documentation
For full documentation, please see https://pytest-mock.readthedocs.io/en/latest.


License
Distributed under the terms of the MIT license.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.