issues Search Results · repo:pytest-dev/pytest-mock language:Python
Filter by
161 results
(78 ms)161 results
inpytest-dev/pytest-mock (press backspace or delete to remove)Hello,
when building dependent packages in Fedora with Python 3.14.0a1, I got this when building meson-python:
____________________________ test_invalid_build_dir ____________________________
package_pure ...
hroncok
- Opened on Oct 24, 2024
- #468
There should be both mocker.patch.context_manager and mocker.patch.object_context_manager.
eugenenelou
- 3
- Opened on Sep 30, 2024
- #462
usingnew parameter in mocker.patch.object
import time
from pytest_mock import MockerFixture
class Kls:
def func(self):
return 1
def test_new(mocker: MockerFixture ):
def new_func(self): ...
Provinm
- 1
- Opened on Aug 21, 2024
- #452
import utils
def func_a(name_list: list[str], name: str):
utils.func_b(name_list)
name_list.remove(name)
import pytest
from pytest_mock import MockerFixture
import dataclasses
from unittest.mock ...
Astral1020
- 2
- Opened on Jun 21, 2024
- #440
Hey 👋 I was writing some tests using pytest-mock and stumbled upon some unexpected behaviour while using
mocker.patch.object.
While patch.object returns a mock object which can be used to assert on, mocker.patch.object ...
UlfurOrn
- 1
- Opened on May 2, 2024
- #428
Consider these two test cases:
@pytest.mark.asyncio
async def test_mocksocket_mocker(mocker):
mocker.patch( socket.socket , wraps=MockSocket)
pass
@pytest.mark.asyncio
async def test_mocksocket_none(): ...
twisteroidambassador
- 1
- Opened on Apr 19, 2024
- #425
Hi,
When building pytest-mock in python 3.12.0:
FAILED ../../../tests/test_pytest_mock.py::TestMockerStub::test_failure_message_with_no_name - AssertionError: Regex pattern did not match.
FAILED ../../../tests/test_pytest_mock.py::TestMockerStub::test_failure_message_with_name[None] ...
UTsweetyfish
- 1
- Opened on Apr 15, 2024
- #423
Hi! Just had some tests fail from which I was looking through mock.mock_calls. Have no seen this documented in the
changelogs.
image (3)
image
Was this an intended change?
FYI I have found a workaround ...
ofx53
- 7
- Opened on Mar 21, 2024
- #420
I want to be able to import Mock and MagicMock types for type annotations.
I don t want to have to import from unittest.mock because I am enforcing the use of pytest-mock by banning the import of
unittest.mock. ...
Kilo59
- Opened on Mar 13, 2024
- #414
When running contribution tests for python 3.12 env:
tox -e py312
I get the following output:
py312: install_package python -I -m pip install --force-reinstall --no-deps /home/brandon/remotes/pytest-mock/.tox/.tmp/package/3/pytest-mock-3.12.1.dev10+g3d48ff9.tar.gz ...
blotero
- 1
- Opened on Jan 25, 2024
- #405

Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Press the /
key to activate the search input again and adjust your query.
Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Restrict your search to the title by using the in:title qualifier.