pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-test-mock py-test-mock: updated to 3.6.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/36d83924a69d
branches:  trunk
changeset: 770145:36d83924a69d
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Nov 25 20:10:26 2021 +0000

description:
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.

diffstat:

 devel/py-test-mock/Makefile |  17 +++++++----------
 devel/py-test-mock/PLIST    |   6 +++++-
 devel/py-test-mock/distinfo |   8 ++++----
 3 files changed, 16 insertions(+), 15 deletions(-)

diffs (71 lines):

diff -r 572048c9a991 -r 36d83924a69d devel/py-test-mock/Makefile
--- a/devel/py-test-mock/Makefile       Thu Nov 25 20:01:56 2021 +0000
+++ b/devel/py-test-mock/Makefile       Thu Nov 25 20:10:26 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.22 2020/05/16 16:30:15 adam Exp $
+# $NetBSD: Makefile,v 1.23 2021/11/25 20:10:26 adam Exp $
 
-DISTNAME=      pytest-mock-2.0.0
+DISTNAME=      pytest-mock-3.6.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/py//}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pytest-mock/}
@@ -11,17 +11,14 @@
 LICENSE=       mit
 
 BUILD_DEPENDS+=        ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
-
-PYTHON_VERSIONED_DEPENDENCIES= test
+DEPENDS+=      ${PYPKGPREFIX}-test>=5.0:../../devel/py-test
 
-.include "../../lang/python/pyversion.mk"
-.if ${_PYTHON_VERSION} == 27
-DEPENDS+=      ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
-.endif
+USE_LANGUAGES= # none
+
+PYTHON_VERSIONS_INCOMPATIBLE=  27
 
 do-test:
-       cd ${WRKSRC} && pytest-${PYVERSSUFFIX}
+       cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
 
 .include "../../lang/python/egg.mk"
-.include "../../lang/python/versioned_dependencies.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 572048c9a991 -r 36d83924a69d devel/py-test-mock/PLIST
--- a/devel/py-test-mock/PLIST  Thu Nov 25 20:01:56 2021 +0000
+++ b/devel/py-test-mock/PLIST  Thu Nov 25 20:10:26 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2019/10/16 16:37:52 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2021/11/25 20:10:26 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -8,9 +8,13 @@
 ${PYSITELIB}/pytest_mock/__init__.py
 ${PYSITELIB}/pytest_mock/__init__.pyc
 ${PYSITELIB}/pytest_mock/__init__.pyo
+${PYSITELIB}/pytest_mock/_util.py
+${PYSITELIB}/pytest_mock/_util.pyc
+${PYSITELIB}/pytest_mock/_util.pyo
 ${PYSITELIB}/pytest_mock/_version.py
 ${PYSITELIB}/pytest_mock/_version.pyc
 ${PYSITELIB}/pytest_mock/_version.pyo
 ${PYSITELIB}/pytest_mock/plugin.py
 ${PYSITELIB}/pytest_mock/plugin.pyc
 ${PYSITELIB}/pytest_mock/plugin.pyo
+${PYSITELIB}/pytest_mock/py.typed
diff -r 572048c9a991 -r 36d83924a69d devel/py-test-mock/distinfo
--- a/devel/py-test-mock/distinfo       Thu Nov 25 20:01:56 2021 +0000
+++ b/devel/py-test-mock/distinfo       Thu Nov 25 20:10:26 2021 +0000
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.21 2021/10/26 10:19:08 nia Exp $
+$NetBSD: distinfo,v 1.22 2021/11/25 20:10:26 adam Exp $
 
-BLAKE2s (pytest-mock-2.0.0.tar.gz) = a3166d8715b732551a7d455aa26cf27cf2512b23beb16b03f88f811220a98a99
-SHA512 (pytest-mock-2.0.0.tar.gz) = 8bd7f634afebeae628470270c81f0198647bf8cd5b0fac438891d881d9823e40e814d598670bb9c9722b864990958e69d385c7c6a6e2adc81d2adcb303fbe0b0
-Size (pytest-mock-2.0.0.tar.gz) = 24665 bytes
+BLAKE2s (pytest-mock-3.6.1.tar.gz) = 576860674f187abe61d2eb9e0f583c1446645f257c69d30af51d3bbb4cffd408
+SHA512 (pytest-mock-3.6.1.tar.gz) = 50a8ffbac1b20b1962558789b24d50c1e7d8d2e2706ee15a576eb5fd1b40d4523482dce7a1078d532b686ff8d38b6d769d356b04241528a0196e14acae0b6199
+Size (pytest-mock-3.6.1.tar.gz) = 29933 bytes



Home | Main Index | Thread Index | Old Index