Skip to content

Commit 27ae485

Browse files
author
Mathieu Leduc-Hamel
committed
Adds an alias for create_autospec
1 parent 1ff24c9 commit 27ae485

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pytest_mock.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def __init__(self, config):
5353
self.call = mock_module.call
5454
self.ANY = mock_module.ANY
5555
self.DEFAULT = mock_module.DEFAULT
56+
self.create_autospec = mock_module.create_autospec
5657
self.sentinel = mock_module.sentinel
5758
self.mock_open = mock_module.mock_open
5859

test_pytest_mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def test_deprecated_mock(mock, tmpdir):
137137
assert os.listdir(str(tmpdir)) == []
138138

139139

140-
@pytest.mark.parametrize('name', ['MagicMock', 'NonCallableMock', 'PropertyMock', 'Mock', 'call', 'ANY', 'sentinel', 'mock_open'])
140+
@pytest.mark.parametrize('name', ['MagicMock', 'NonCallableMock', 'PropertyMock', 'Mock', 'call', 'ANY', 'create_autospec', 'sentinel', 'mock_open'])
141141
def test_mocker_aliases(name, pytestconfig):
142142
from pytest_mock import _get_mock_module, MockFixture
143143

0 commit comments

Comments
 (0)