Commit Graph

47 Commits

Author SHA256 Message Date
Ana Guerrero
10d375e8bd Accepting request 1134209 from devel:languages:python:pytest
- Fix tests with python 3.11.7
- Add patch fix-tests-python3117.patch gh#pytest-dev/pytest-mock#403

OBS-URL: https://build.opensuse.org/request/show/1134209
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=26
2023-12-21 22:37:21 +00:00
b1ce010d42 Accepting request 1134208 from home:dgarcia:branches:devel:languages:python:Factory
- Fix tests with python 3.11.7
- Add patch fix-tests-python3117.patch gh#pytest-dev/pytest-mock#403

OBS-URL: https://build.opensuse.org/request/show/1134208
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=40
2023-12-20 12:44:07 +00:00
Ana Guerrero
803048204c Accepting request 1124082 from devel:languages:python:pytest
- update to 3.12.0:
  * Added support for Python 3.12.
  * Dropped support for EOL Python 3.7.
  * ``mocker.resetall()`` now also resets mocks created by
    ``mocker.create_autospec`` (`#390`_).

- add upstream patch to test with pytest5 - fix_tests.patch

OBS-URL: https://build.opensuse.org/request/show/1124082
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=25
2023-11-08 21:17:09 +00:00
312a9e3b24 - update to 3.12.0:
* Added support for Python 3.12.
  * Dropped support for EOL Python 3.7.
  * ``mocker.resetall()`` now also resets mocks created by
    ``mocker.create_autospec`` (`#390`_).
- add upstream patch to test with pytest5 - fix_tests.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=38
2023-11-07 19:36:34 +00:00
Ana Guerrero
64799600d0 Accepting request 1100451 from devel:languages:python:pytest
- update to 3.11.1:
  * Fixed introspection for failed ``assert_has_calls``
  * Updated type annotations for ``mocker.patch`` and
    ``mocker.spy`` (`#364`_).

OBS-URL: https://build.opensuse.org/request/show/1100451
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=24
2023-07-26 11:21:42 +00:00
90850a03a3 - update to 3.11.1:
* Fixed introspection for failed ``assert_has_calls``
  * Updated type annotations for ``mocker.patch`` and
    ``mocker.spy`` (`#364`_).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=36
2023-07-24 19:10:39 +00:00
Dominique Leuenberger
2d6b9a407e Accepting request 1082432 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/1082432
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=23
2023-04-25 14:53:30 +00:00
3e9e61b0d6 Accepting request 1082415 from home:dirkmueller:acdc:as_python3_module
SR for python stack proposal

OBS-URL: https://build.opensuse.org/request/show/1082415
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=34
2023-04-24 09:15:28 +00:00
Dominique Leuenberger
2490d4754d Accepting request 1039088 from devel:languages:python:pytest
- Remove python_module macro definition
- Remove pytest-mock-issue272-asyncio.patch
- Add python-py dependency
- Update to 3.10.0:
  * Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy
    calls (#319).
- 3.9.0:
  * Expose NonCallableMagicMock via the mocker fixture (#318).
- 3.8.2:
  * Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302).
- 3.8.1:
  * Fix regression caused by an explicit mock dependency in the code (#298).
- 3.8.0:
  * Add MockerFixture.async_mock method. Thanks @PerchunPak for the PR (#296).
- 3.7.0:
  * Python 3.10 now officially supported.
  * Dropped support for Python 3.6.

OBS-URL: https://build.opensuse.org/request/show/1039088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=22
2023-01-06 16:04:30 +00:00
6cae8c38a8 - Remove python_module macro definition
- Remove pytest-mock-issue272-asyncio.patch
- Add python-py dependency
- Update to 3.10.0:
  * Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy
    calls (#319).
- 3.9.0:
  * Expose NonCallableMagicMock via the mocker fixture (#318).
- 3.8.2:
  * Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302).
- 3.8.1:
  * Fix regression caused by an explicit mock dependency in the code (#298).
- 3.8.0:
  * Add MockerFixture.async_mock method. Thanks @PerchunPak for the PR (#296).
- 3.7.0:
  * Python 3.10 now officially supported.
  * Dropped support for Python 3.6.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=32
2022-11-30 11:28:26 +00:00
Dominique Leuenberger
dd2704d14b Accepting request 948117 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/948117
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=21
2022-01-23 15:25:41 +00:00
934565788f Accepting request 948100 from home:bnavigator:branches:devel:languages:python:pytest
- Add pytest-mock-issue272-asyncio.patch
  * gh#pytest-dev/pytest-mock#272

OBS-URL: https://build.opensuse.org/request/show/948100
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=31
2022-01-22 14:52:27 +00:00
Dominique Leuenberger
3478fd9e42 Accepting request 900347 from devel:languages:python:pytest
poetry is now fixed with https://build.opensuse.org/request/show/900345

- Update to 3.6.1:
  * Fix mocker.resetall() when using mocker.spy() (#237)
- Update to 3.6.0:
  * 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.
- Update to 3.5.1:
  * Use inspect.getattr_static instead of resorting to
    object.__getattribute__ magic. This should better comply with
    objects which implement a custom descriptor protocol.
- Update to 3.5.0:
  * 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.
- Update to 3.4.0:
  * Add [mock.seal]{.title-ref} alias to the [mocker]{.title-ref}
    fixture (#211).
  * Fixed spying on exceptions not covered by the Exception
    superclass (#215), 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.
- Update to 3.3.1:
  * Introduce MockFixture as an alias to MockerFixture.
    Before 3.3.0, the fixture class was named MockFixture, but was

OBS-URL: https://build.opensuse.org/request/show/900347
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=20
2021-06-19 21:01:45 +00:00
d6cabaefe5 Accepting request 897138 from home:alarrosa:branches:devel:languages:python:pytest
- Update to 3.6.1:
  * Fix mocker.resetall() when using mocker.spy() (#237)
- Update to 3.6.0:
  * 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.
- Update to 3.5.1:
  * Use inspect.getattr_static instead of resorting to
    object.__getattribute__ magic. This should better comply with
    objects which implement a custom descriptor protocol.
- Update to 3.5.0:
  * 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.
- Update to 3.4.0:
  * Add [mock.seal]{.title-ref} alias to the [mocker]{.title-ref}
    fixture (#211).
  * Fixed spying on exceptions not covered by the Exception
    superclass (#215), 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.
- Update to 3.3.1:
  * Introduce MockFixture as an alias to MockerFixture.
    Before 3.3.0, the fixture class was named MockFixture, but was

OBS-URL: https://build.opensuse.org/request/show/897138
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=29
2021-06-03 13:50:22 +00:00
Dominique Leuenberger
ec85a14826 Accepting request 812814 from devel:languages:python:pytest
- Update to 3.1.1:
  * Fixed performance regression caused by the ValueError raised
    when mocker is used as context manager (#191).

OBS-URL: https://build.opensuse.org/request/show/812814
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=19
2020-06-11 12:45:28 +00:00
Tomáš Chvátal
85cee62be4 - Update to 3.1.1:
* Fixed performance regression caused by the ValueError raised
    when mocker is used as context manager (#191).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=27
2020-06-09 07:59:33 +00:00
Dominique Leuenberger
69081de824 Accepting request 798138 from devel:languages:python:pytest
- Update to 3.1.0:
  * Python 2.7 and 3.4 are no longer supported
  * New mocker fixtures added that allow using mocking functionality
    in other scopes

OBS-URL: https://build.opensuse.org/request/show/798138
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=18
2020-05-01 09:06:02 +00:00
Tomáš Chvátal
8715cb0d4a - Update to 3.1.0:
* Python 2.7 and 3.4 are no longer supported
  * New mocker fixtures added that allow using mocking functionality
    in other scopes

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=25
2020-04-27 10:21:09 +00:00
Dominique Leuenberger
dca62fa2d7 Accepting request 761149 from devel:languages:python:pytest
- Update to 2.0.0:
  * 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.
  * The deprecated mock alias to the mocker fixture has finally
    been removed.

OBS-URL: https://build.opensuse.org/request/show/761149
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=17
2020-01-16 17:13:39 +00:00
Tomáš Chvátal
c1fdc5c40a - Update to 2.0.0:
* 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.
  * The deprecated mock alias to the mocker fixture has finally
    been removed.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=23
2020-01-06 13:13:41 +00:00
Dominique Leuenberger
e64f7a3296 Accepting request 753969 from devel:languages:python:pytest
- Update to 1.12.1:
  * Fix error if mocker.patch is used in code where the source file
    is not available, for example stale .pyc files
  * Now all patch functions also raise a ValueError when used as a
    context-manager

OBS-URL: https://build.opensuse.org/request/show/753969
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=16
2019-12-11 10:59:52 +00:00
Tomáš Chvátal
3bf39040c1 - Update to 1.12.1:
* Fix error if mocker.patch is used in code where the source file
    is not available, for example stale .pyc files
  * Now all patch functions also raise a ValueError when used as a
    context-manager

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=21
2019-12-04 12:07:12 +00:00
Dominique Leuenberger
c3f98f3838 Accepting request 749236 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/749236
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=15
2019-11-22 09:25:44 +00:00
Tomáš Chvátal
fc04c77c35 Accepting request 749233 from home:frispete:python
Done:

- Disable current failing tests
  see: https://github.com/pytest-dev/pytest-mock/issues/167
  boils done to an issue of pytest

OBS-URL: https://build.opensuse.org/request/show/749233
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=19
2019-11-18 09:58:52 +00:00
Tomáš Chvátal
abc8e44210 - Update to 1.11.2:
* The pytest introspection follows message is no longer shown
    if there is no pytest introspection (#154)
  * mocker now raises a ValueError when used as a context-manager

- Update to 1.11.1:
  * Fix mocker.spy on Python 2 when used on non-function objects
    which implement __call__ (#157).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=18
2019-11-05 10:53:59 +00:00
Dominique Leuenberger
b3f976ab26 Accepting request 734062 from devel:languages:python:pytest
- Update to 1.11.0:
  * The object returned by mocker.spy now also tracks the return
    value of the spied method/function.
- Drop merged patch mock3.patch and fix_tests.patch

OBS-URL: https://build.opensuse.org/request/show/734062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=14
2019-10-07 11:39:38 +00:00
Tomáš Chvátal
24f04b847b - Update to 1.11.0:
* The object returned by mocker.spy now also tracks the return
    value of the spied method/function.
- Drop merged patch mock3.patch and fix_tests.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=16
2019-09-30 12:24:55 +00:00
Dominique Leuenberger
233df2937d Accepting request 730055 from devel:languages:python:pytest
- Add back the mock 3.0 patch as the mock is being integrated now:
  * mock3.patch

OBS-URL: https://build.opensuse.org/request/show/730055
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=13
2019-09-23 10:06:35 +00:00
Tomáš Chvátal
994534d7c5 - Add back the mock 3.0 patch as the mock is being integrated now:
* mock3.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=14
2019-09-11 08:21:53 +00:00
Dominique Leuenberger
348dc0c317 Accepting request 718868 from devel:languages:python:pytest
- Remove mock30.patch for now as we are not able to upgrade
  to mock3 yet

- add upstream patch to test with pytest5 - fix_tests.patch 

- Add patch from upstream to build with new mock:
  * mock30.patch

OBS-URL: https://build.opensuse.org/request/show/718868
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=12
2019-07-30 11:06:23 +00:00
Tomáš Chvátal
32a128e74c - Remove mock30.patch for now as we are not able to upgrade
to mock3 yet

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=12
2019-07-26 12:27:26 +00:00
5c4df46496 - add upstream patch to test with pytest5 - fix_tests.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=11
2019-07-18 08:53:17 +00:00
Tomáš Chvátal
8b4c7c2210 - Add patch from upstream to build with new mock:
* mock30.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=10
2019-05-15 17:40:12 +00:00
Dominique Leuenberger
01ad45569f Accepting request 699374 from devel:languages:python:pytest
- Update to 1.10.4:
  * Fix plugin when 'terminal' plugin is disabled

OBS-URL: https://build.opensuse.org/request/show/699374
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=11
2019-05-02 17:13:47 +00:00
Tomáš Chvátal
5e94b71b18 - Update to 1.10.4:
* Fix plugin when 'terminal' plugin is disabled

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=8
2019-04-29 08:07:31 +00:00
Dominique Leuenberger
7fffd609bb Accepting request 690275 from devel:languages:python:pytest
- Update to 1.10.3:
  * Fix test suite in Python 3.8. Thanks @hroncok for the report and @blueyed for the PR (#140).

OBS-URL: https://build.opensuse.org/request/show/690275
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=10
2019-04-04 10:00:26 +00:00
Tomáš Chvátal
30379a6a38 - Update to 1.10.3:
* Fix test suite in Python 3.8. Thanks @hroncok for the report and @blueyed for the PR (#140).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=6
2019-04-01 08:36:12 +00:00
Dominique Leuenberger
d15ef49241 Accepting request 688629 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/688629
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=9
2019-03-29 19:37:41 +00:00
Tomáš Chvátal
dfed9bffb9 Accepting request 688627 from home:jayvdb:django
- Update to v1.10.2
  * Fix bug at the end of the test session when a call to
    patch.stopall is done explicitly by user code.

OBS-URL: https://build.opensuse.org/request/show/688627
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-mock?expand=0&rev=4
2019-03-26 09:41:07 +00:00
Stephan Kulow
e78171b7d2 Accepting request 674447 from devel:languages:python:pytest
- Update to 1.10.1:
  * Fix broken links and update README. Also the code is now formatted using black.

OBS-URL: https://build.opensuse.org/request/show/674447
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=8
2019-02-24 16:05:20 +00:00
Dominique Leuenberger
48aacc1496 Accepting request 605130 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/605130
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=7
2018-05-11 09:26:38 +00:00
Dominique Leuenberger
dd3e42c536 Accepting request 599637 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/599637
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=6
2018-04-26 11:34:36 +00:00
Dominique Leuenberger
1b2e7377ba Accepting request 582182 from devel:languages:python
- update to 1.7.1
  * fix reading README.rst in setup.py

- fix deps for setuptools

- update to 1.7.0
  * Drop support for python-2.6 and python-3.3

OBS-URL: https://build.opensuse.org/request/show/582182
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=5
2018-03-05 12:36:03 +00:00
Dominique Leuenberger
c8d84e85b7 Accepting request 563590 from devel:languages:python
- Fix building with python3 only available
- Install properly license file/etc

OBS-URL: https://build.opensuse.org/request/show/563590
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=4
2018-01-16 08:37:39 +00:00
Dominique Leuenberger
07ca7a3be9 Accepting request 533466 from devel:languages:python
1

OBS-URL: https://build.opensuse.org/request/show/533466
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=3
2017-10-21 18:20:13 +00:00
Dominique Leuenberger
bafad513a0 Accepting request 516165 from devel:languages:python
1

OBS-URL: https://build.opensuse.org/request/show/516165
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=2
2017-08-14 10:38:47 +00:00
Dominique Leuenberger
6962a44623 Accepting request 492870 from devel:languages:python
needed for new python-requests

OBS-URL: https://build.opensuse.org/request/show/492870
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=1
2017-05-16 12:28:46 +00:00