BSD Ports

devel/py-test-mock 3.15.1 NetBSD

Thin-wrapper around the mock package for easier use with py.test

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
Last update
Commit
a4a1ab08be
License
mit
Categories
devel, python
Package size
21.3 KiB, 102.2 KiB installed

Description

This plugin installs a mocker fixture which is a thin-wrapper around the patching API provided by the mock package, but with the benefit of not having to worry about undoing patches at the end of a test.

In the other systems

SystemPortVersion
NetBSDdevel/py-test-mock3.15.1
OpenBSDdevel/py-test-mock3.15.1p0

Install

Binary package:

pkgin install py311-test-mock

From pkgsrc:

cd /usr/pkgsrc/devel/py-test-mock && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_643.15.1
NetBSD 10.1 aarch643.15.1
SmartOS / illumos x86_643.17.0
macOS 15 arm643.16.0

Dependencies

Run dependencies 2

No port depends on this one.

Configuration

No options to configure.

Service scripts
none
Flavors
py312-test-mock-3.15.1, py313-test-mock-3.15.1, py314-test-mock-3.15.1

Commit history 2

DateCommitCreditsLog message
a4a1ab08be adam py-test-mock: updated to 3.17.0
3.17.0 * Failures of mock assertions such as ``assert_called_with`` are again reported only once, instead of two or three times with the original error from the ``mock`` module chained before them. * Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: ``assert_called``, ``assert_called_once``, ``assert_not_called``, ``assert_any_call``, their ``await`` counterparts, and ``assert_called_once_with``/``assert_awaited_once_with`` when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty ``Args:``/``Kwargs:`` sections when assertion rewriting is not available. …
0168444c30 adam py-test-mock: updated to 3.16.0
3.16.0 * Fixed ``duplicate_iterators=True`` for async functions spied with ``mocker.spy``. * Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments. * ``mocker.resetall(return_value=True, side_effect=True)`` now also applies to non-callable mocks, such as those returned by ``mocker.create_autospec(SomeClass, instance=True)``. Previously both arguments were silently ignored for them. * Added ``SpyType`` for annotating ``mocker.spy`` results. * Dropped support for EOL Python 3.9. * Removed handling of ``RuntimeError: stop called on unstarted patcher``, which can no longer occur in the supported Python versions. * Added support for Python 3.15.