py-test-mock: updated to 3.6.1 3.6.1 (2021-05-06) ------------------ * Fix ``mocker.resetall()`` when using ``mocker.spy()`` 3.6.0 (2021-04-24) ------------------ * pytest-mock no longer supports Python 3.5. * Correct type annotations for ``mocker.patch.object`` to also include the string form. * ``reset_all`` now supports ``return_value`` and ``side_effect`` keyword arguments. 3.5.1 (2021-01-10) ------------------ * Use ``inspect.getattr_static`` instead of resorting to ``object.__getattribute__`` magic. This should better comply with objects which implement a custom descriptor protocol. 3.5.0 (2021-01-04) ------------------ * Now all patch functions will emit a warning instead of raising a ``ValueError`` when used as a context-manager. * Additionally, ``mocker.patch.context_manager`` is available when the user intends to mock a context manager (for example ``threading.Lock`` object), which will not emit that warning. 3.4.0 (2020-12-15) ------------------ * Add `mock.seal` alias to the `mocker` fixture. * Fixed spying on exceptions not covered by the ``Exception`` superclass, like ``KeyboardInterrupt``. Before the fix, both ``spy_return`` and ``spy_exception`` were always assigned to ``None`` whenever such an exception happened. And after this fix, ``spy_exception`` is set to a correct value of an exception that has actually happened. 3.3.1 (2020-08-24) ------------------ * Introduce ``MockFixture`` as an alias to ``MockerFixture``. Before ``3.3.0``, the fixture class was named ``MockFixture``, but was renamed to ``MockerFixture`` to better match the ``mocker`` fixture. While not officially part of the API, it was later discovered that this broke the code of some users which already imported ``pytest_mock.MockFixture`` for type annotations, so we decided to reintroduce the name as an alias. Note however that this is just a stop gap measure, and new code should use ``MockerFixture`` for type annotations. * Improved typing for ``MockerFixture.patch`` 3.3.0 (2020-08-21) ------------------ * ``pytest-mock`` now includes inline type annotations and exposes them to user programs. The ``mocker`` fixture returns ``pytest_mock.MockerFixture``, which can be used to annotate your tests: .. code-block:: python from pytest_mock import MockerFixture def test_foo(mocker: MockerFixture) -> None: ... The type annotations were developed against mypy version ``0.782``, the minimum version supported at the moment. If you run into an error that you believe to be incorrect, please open an issue. 3.2.0 (2020-07-11) ------------------ * `AsyncMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.AsyncMock>`__ is now exposed in ``mocker`` and supports provides assertion introspection similar to ``Mock`` objects. 3.1.1 (2020-05-31) ------------------ * Fixed performance regression caused by the ``ValueError`` raised when ``mocker`` is used as context manager. 3.1.0 (2020-04-18) ------------------ * New mocker fixtures added that allow using mocking functionality in other scopes: * ``class_mocker`` * ``module_mocker`` * ``package_mocker`` * ``session_mocker`` 3.0.0 (2020-03-31) ------------------ * Python 2.7 and 3.4 are no longer supported. Users using ``pip 9`` or later will install a compatible version automatically. * ``mocker.spy`` now also works with ``async def`` functions.diff -r1.22 -r1.23 pkgsrc/devel/py-test-mock/Makefile
(adam)
@@ -1,27 +1,24 @@ | @@ -1,27 +1,24 @@ | |||
1 | # $NetBSD: Makefile,v 1.22 2020/05/16 16:30:15 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.23 2021/11/25 20:10:26 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= pytest-mock-2.0.0 | 3 | DISTNAME= pytest-mock-3.6.1 | |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//} | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//} | |
5 | CATEGORIES= devel python | 5 | CATEGORIES= devel python | |
6 | MASTER_SITES= ${MASTER_SITE_PYPI:=p/pytest-mock/} | 6 | MASTER_SITES= ${MASTER_SITE_PYPI:=p/pytest-mock/} | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://github.com/pytest-dev/pytest-mock | 9 | HOMEPAGE= https://github.com/pytest-dev/pytest-mock | |
10 | COMMENT= Thin-wrapper around the mock package for easier use with py.test | 10 | COMMENT= Thin-wrapper around the mock package for easier use with py.test | |
11 | LICENSE= mit | 11 | LICENSE= mit | |
12 | 12 | |||
13 | BUILD_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm | 13 | BUILD_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm | |
14 | DEPENDS+= ${PYPKGPREFIX}-test>=5.0:../../devel/py-test | |||
14 | 15 | |||
15 | PYTHON_VERSIONED_DEPENDENCIES= test | 16 | USE_LANGUAGES= # none | |
16 | 17 | |||
17 | .include "../../lang/python/pyversion.mk" | 18 | PYTHON_VERSIONS_INCOMPATIBLE= 27 | |
18 | .if ${_PYTHON_VERSION} == 27 | |||
19 | DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock | |||
20 | .endif | |||
21 | 19 | |||
22 | do-test: | 20 | do-test: | |
23 | cd ${WRKSRC} && pytest-${PYVERSSUFFIX} | 21 | cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} | |
24 | 22 | |||
25 | .include "../../lang/python/egg.mk" | 23 | .include "../../lang/python/egg.mk" | |
26 | .include "../../lang/python/versioned_dependencies.mk" | |||
27 | .include "../../mk/bsd.pkg.mk" | 24 | .include "../../mk/bsd.pkg.mk" |
@@ -1,16 +1,20 @@ | @@ -1,16 +1,20 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.2 2019/10/16 16:37:52 adam Exp $ | 1 | @comment $NetBSD: PLIST,v 1.3 2021/11/25 20:10:26 adam Exp $ | |
2 | ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO | 2 | ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO | |
3 | ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt | 3 | ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt | |
4 | ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt | 4 | ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt | |
5 | ${PYSITELIB}/${EGG_INFODIR}/entry_points.txt | 5 | ${PYSITELIB}/${EGG_INFODIR}/entry_points.txt | |
6 | ${PYSITELIB}/${EGG_INFODIR}/requires.txt | 6 | ${PYSITELIB}/${EGG_INFODIR}/requires.txt | |
7 | ${PYSITELIB}/${EGG_INFODIR}/top_level.txt | 7 | ${PYSITELIB}/${EGG_INFODIR}/top_level.txt | |
8 | ${PYSITELIB}/pytest_mock/__init__.py | 8 | ${PYSITELIB}/pytest_mock/__init__.py | |
9 | ${PYSITELIB}/pytest_mock/__init__.pyc | 9 | ${PYSITELIB}/pytest_mock/__init__.pyc | |
10 | ${PYSITELIB}/pytest_mock/__init__.pyo | 10 | ${PYSITELIB}/pytest_mock/__init__.pyo | |
11 | ${PYSITELIB}/pytest_mock/_util.py | |||
12 | ${PYSITELIB}/pytest_mock/_util.pyc | |||
13 | ${PYSITELIB}/pytest_mock/_util.pyo | |||
11 | ${PYSITELIB}/pytest_mock/_version.py | 14 | ${PYSITELIB}/pytest_mock/_version.py | |
12 | ${PYSITELIB}/pytest_mock/_version.pyc | 15 | ${PYSITELIB}/pytest_mock/_version.pyc | |
13 | ${PYSITELIB}/pytest_mock/_version.pyo | 16 | ${PYSITELIB}/pytest_mock/_version.pyo | |
14 | ${PYSITELIB}/pytest_mock/plugin.py | 17 | ${PYSITELIB}/pytest_mock/plugin.py | |
15 | ${PYSITELIB}/pytest_mock/plugin.pyc | 18 | ${PYSITELIB}/pytest_mock/plugin.pyc | |
16 | ${PYSITELIB}/pytest_mock/plugin.pyo | 19 | ${PYSITELIB}/pytest_mock/plugin.pyo | |
20 | ${PYSITELIB}/pytest_mock/py.typed |
@@ -1,5 +1,5 @@ | @@ -1,5 +1,5 @@ | |||
1 | $NetBSD: distinfo,v 1.21 2021/10/26 10:19:08 nia Exp $ | 1 | $NetBSD: distinfo,v 1.22 2021/11/25 20:10:26 adam Exp $ | |
2 | 2 | |||
3 | BLAKE2s (pytest-mock-2.0.0.tar.gz) = a3166d8715b732551a7d455aa26cf27cf2512b23beb16b03f88f811220a98a99 | 3 | BLAKE2s (pytest-mock-3.6.1.tar.gz) = 576860674f187abe61d2eb9e0f583c1446645f257c69d30af51d3bbb4cffd408 | |
4 | SHA512 (pytest-mock-2.0.0.tar.gz) = 8bd7f634afebeae628470270c81f0198647bf8cd5b0fac438891d881d9823e40e814d598670bb9c9722b864990958e69d385c7c6a6e2adc81d2adcb303fbe0b0 | 4 | SHA512 (pytest-mock-3.6.1.tar.gz) = 50a8ffbac1b20b1962558789b24d50c1e7d8d2e2706ee15a576eb5fd1b40d4523482dce7a1078d532b686ff8d38b6d769d356b04241528a0196e14acae0b6199 | |
5 | Size (pytest-mock-2.0.0.tar.gz) = 24665 bytes | 5 | Size (pytest-mock-3.6.1.tar.gz) = 29933 bytes |