The NetBSD Project

CVS log for pkgsrc/devel/py-test-mock/Makefile

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / devel / py-test-mock

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Nov 11 07:28:25 2024 UTC (30 hours, 21 minutes ago) by wiz
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +1 -2 lines
py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Mar 24 17:43:21 2024 UTC (7 months, 2 weeks ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +6 -7 lines
py-test-mock: updated to 3.14.0

3.14.0 (2024-03-21)
-------------------

* `MockType`` and ``AsyncMockType`` can be imported from ``pytest_mock`` for type annotation purposes.

* Fixed a regression which would cause ``mocker.patch.object`` to not being properly cleared between tests.


3.13.0 (2024-03-21)
-------------------

* ``spy`` now has ``spy_return_list``, which is a list containing all the values returned by the spied function.
* ``pytest-mock`` now requires ``pytest>=6.2.5``.
* pytest-mock's ``setup.py`` file is removed.
  If you relied on this file, e.g. to install pytest using ``setup.py install``,
  please see `Why you shouldn't invoke setup.py directly <https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary>`_ for alternatives.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Oct 20 14:17:44 2023 UTC (12 months, 3 weeks ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
py-test-mock: updated to 3.12.0

3.12.0 (2023-10-19)
-------------------

* Added support for Python 3.12.
* Dropped support for EOL Python 3.7.
* ``mocker.resetall()`` now also resets mocks created by ``mocker.create_autospec``

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Jun 17 18:30:21 2023 UTC (16 months, 3 weeks ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
py-test-mock: updated to 3.11.1

3.11.1 (2023-06-15)
-------------------
* Fixed introspection for failed ``assert_has_calls``
* Updated type annotations for ``mocker.patch`` and ``mocker.spy``

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jun 6 12:41:15 2023 UTC (17 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -2 lines
Mass-change BUILD_DEPENDS to TOOL_DEPENDS outside mk/.

Almost all uses, if not all of them, are wrong, according to the
semantics of BUILD_DEPENDS (packages built for target available for
use _by_ tools at build-time) and TOOL_DEPEPNDS (packages built for
host available for use _as_ tools at build-time).

No change to BUILD_DEPENDS as used correctly inside buildlink3.

As proposed on tech-pkg:
https://mail-index.netbsd.org/tech-pkg/2023/06/03/msg027632.html

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Oct 25 07:58:13 2022 UTC (2 years ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
py-test-mock: updated to 3.10.0

3.10.0 (2022-10-05)
* Added new ``mocker.stop(m)`` method to stop specific ``mocker.patch`` or ``mocker.spy`` calls.

3.9.0 (2022-09-28)
* Expose ``NonCallableMagicMock`` via the ``mocker`` fixture.

3.8.2 (2022-07-05)
- Fixed ``AsyncMock`` support for Python 3.7+ in ``mocker.async_stub``.

3.8.1 (2022-06-24)
* Fixed regression caused by an explicit ``mock`` dependency in the code.

3.8.0 (2022-06-24)
* Add ``MockerFixture.async_mock`` method.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Apr 26 10:34:44 2022 UTC (2 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -3 lines
py-test-mock: updated to 3.7.0

3.7.0 (2022-01-28)
------------------
* Python 3.10 now officially supported.
* Dropped support for Python 3.6.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Jan 4 20:53:41 2022 UTC (2 years, 10 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2022Q1-base, pkgsrc-2022Q1
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -1 lines
*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Nov 25 20:10:26 2021 UTC (2 years, 11 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2021Q4-base, pkgsrc-2021Q4
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -9 lines
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.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat May 16 16:30:15 2020 UTC (4 years, 5 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -2 lines
pytest from versioned deps.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jan 27 13:05:07 2020 UTC (4 years, 9 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -2 lines
py-test-mock: updated to 2.0.0

2.0.0:

Breaking Changes

mocker.spy attributes for tracking returned values and raised exceptions of its spied functions are now called spy_return and spy_exception, instead of reusing the existing MagicMock attributes return_value and side_effect.

Version 1.13 introduced a serious regression: after a spied function using mocker.spy raises an exception, further calls to the spy will not call the spied function, always raising the first exception instead: assigning to side_effect causes unittest.mock to behave this way.

The deprecated mock alias to the mocker fixture has finally been removed.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Dec 11 10:32:34 2019 UTC (4 years, 11 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -2 lines
py-test-mock: updated to 1.13.0

1.13.0:
* The object returned by ``mocker.spy`` now also tracks any side effect
  of the spied method/function.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Nov 21 20:35:27 2019 UTC (4 years, 11 months ago) by adam
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
py-test-mock: updated to 1.12.1

1.12.1:
* Fix error if ``mocker.patch`` is used in code where the source file
  is not available, for example stale ``.pyc`` files

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Nov 20 10:10:22 2019 UTC (4 years, 11 months ago) by adam
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
py-test-mock: updated to 1.12.0

1.12.0:
Now all patch functions also raise a ValueError when used as a context-manager.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Oct 24 12:53:48 2019 UTC (5 years ago) by adam
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
py-test-mock: updated to 1.11.2

1.11.2:
* The *pytest introspection follows* message is no longer shown
  if there is no pytest introspection.
* ``mocker`` now raises a ``TypeError`` when used as a context-manager.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Oct 16 16:37:52 2019 UTC (5 years ago) by adam
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
py-test-mock: updated to 1.11.1

1.11.1
* Fix ``mocker.spy`` on Python 2 when used on non-function objects
  which implement ``__call__``.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Oct 2 10:19:51 2019 UTC (5 years, 1 month ago) by adam
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
py-test-mock: updated to 1.11.0

1.11.0
* The object returned by ``mocker.spy`` now also tracks the return value
  of the spied method/function.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Apr 24 15:04:21 2019 UTC (5 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
py-test-mock: updated to 1.10.4

1.10.4
* Fix plugin when 'terminal' plugin is disabled

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Apr 2 08:50:58 2019 UTC (5 years, 7 months ago) by adam
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
py-test-mock: updated to 1.10.3

1.10.3
* Fix test suite in Python 3.8.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Mar 27 08:35:06 2019 UTC (5 years, 7 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
py-test-mock: updated to 1.10.2

1.10.2
* Fix bug at the end of the test session when a call to patch.stopall is done explicitly by
  user code.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Feb 6 08:54:09 2019 UTC (5 years, 9 months ago) by adam
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -4 lines
py-test-mock: updated to 1.10.1

1.10.1
Fix broken links and update README. Also the code is now formatted using black.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed May 2 07:33:45 2018 UTC (6 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -3 lines
py-test-mock: updated to 1.10.0

1.10.0:
Add support for the recently added assert_called method in Python 3.6 and mock-2.0.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Apr 11 19:51:41 2018 UTC (6 years, 7 months ago) by adam
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
py-test-mock: updated to 1.9.0

1.9.0
Add support for the recently added assert_called_once method in Python 3.6 and mock-2.0.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Apr 7 20:02:39 2018 UTC (6 years, 7 months ago) by adam
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
py-test-mock: updated to 1.8.0

1.8.0
Add aliases for NonCallableMock and create_autospec to mocker.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Mar 2 11:39:17 2018 UTC (6 years, 8 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
py-test-mock: updated to 1.7.1

1.7.1:
Fix setup.py to correctly read the README.rst.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Feb 22 09:49:46 2018 UTC (6 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -4 lines
py-test-mock: updated to 1.7.0

1.7.0:
Incompatible change
pytest-mock no longer supports Python 2.6 and Python 3.3, following the lead of pytest and other projects in the community.

Packaging
Fix mock requirement in Python 2.

Internal
Some tests in pytest-mock's suite are skipped if assertion rewriting is disabled

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Sep 18 17:01:25 2017 UTC (7 years, 1 month ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
py-test-mock: update to 1.6.3

1.6.3
* Fix ``UnicodeDecodeError`` during assert introspection in ``assert_called_with`` in Python 2.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jul 18 05:02:03 2017 UTC (7 years, 3 months ago) by adam
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -4 lines
1.6.2:
* Provide source package in ``tar.gz`` format and remove obsolete ``MANIFEST.in``.

1.6.1:
* Fix ``mocker.resetall()`` by ignoring mocker objects which don't have a
  ``resetall`` method, like for example ``patch.dict``.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Apr 14 07:13:51 2017 UTC (7 years, 7 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -1 lines
BUILD_DEPEND on setuptools_scm for joerg.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Apr 5 11:18:32 2017 UTC (7 years, 7 months ago) by wiz
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +7 -3 lines
Only on python-2.x does this module need py-mock as dependency.

Bump PKGREVISION.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Apr 4 14:02:44 2017 UTC (7 years, 7 months ago) by wiz
Branches: MAIN
Import py-test-mock-1.6.0 as devel/py-test-mock.

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.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>