Home
last modified time | relevance | path

Searched refs:mock_open (Results 1 – 25 of 25) sorted by relevance

/external/python/mock/mock/tests/
Dtestwith.py10 from mock import MagicMock, Mock, patch, sentinel, mock_open, call
139 mock = mock_open()
148 mock = mock_open()
160 mock = mock_open()
176 mock_open(mock)
186 mock = mock_open(read_data='foo')
196 mock = mock_open(read_data='foo\nbar\nbaz\n')
207 mock = mock_open(read_data='foo')
216 mock = mock_open(read_data='foo\nbar\nbaz\n')
224 mock = mock_open(read_data='foo\nbar\nbaz')
[all …]
Dtestmock.py275 a = mock.mock_open()
1464 mocked_open = mock.mock_open(read_data='data')
1473 mock_namedtemp = mock.mock_open(mock.MagicMock(name='JLV'))
1483 mopen = mock.mock_open(read_data='foo\nbarn')
Dtestpatch.py404 def test_open(mock_open): argument
405 m = mock_open.return_value
/external/python/cpython3/Lib/unittest/test/testmock/
Dtestwith.py5 from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call
148 mock = mock_open()
157 mock = mock_open()
169 mock = mock_open()
185 mock_open(mock)
195 mock = mock_open(read_data='foo')
206 mock = mock_open(read_data='foo\nbar\nbaz\n')
218 mock = mock_open(read_data='foo')
228 mock = mock_open(read_data='foo\nbar\nbaz\n')
240 mock = mock_open(read_data='foo\nbar\nbaz\n')
[all …]
Dtestmock.py251 a = mock.mock_open()
1619 mocked_open = mock.mock_open(read_data='data')
1629 mocked_open = mock.mock_open(read_data='Remarkable\nNorwegian Blue')
1638 mock_namedtemp = mock.mock_open(mock.MagicMock(name='JLV'))
1648 mopen = mock.mock_open(read_data='foo\nbarn')
1657 _open = mock.mock_open(read_data='foo')
Dtestpatch.py400 def test_open(mock_open): argument
401 m = mock_open.return_value
/external/python/oauth2client/tests/contrib/
Dtest_locked_file.py83 def test_lock_access_error_fallback_mode(self, mock_open): argument
88 mock_open.side_effect = [IOError(errno.ENOENT, '')]
95 def test_lock_non_access_error(self, mock_open): argument
98 mock_open.side_effect = [IOError(errno.EACCES, ''), fh_mock]
105 def test_lock_unexpected_error(self, mock_open): argument
116 def test_lock_timeout_error(self, mock_time, mock_logger, mock_open): argument
131 def test_lock_timeout_error_no_fh(self, mock_time, mock_logger, mock_open): argument
137 mock_open.side_effect = [IOError(errno.ENOENT, ''), fh_mock]
150 def test_lock_retry_success(self, mock_sleep, mock_time, mock_open): argument
/external/python/mock/
DNEWS13 - Issue #23004: mock_open() now reads binary data correctly when the type of
16 - Issue #21750: mock_open.read_data can now be read from each instance, as it
19 - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
67 - Issue #17467: add readline and readlines support to mock_open in
/external/python/cpython3/Lib/idlelib/idle_test/
Dtest_outwin.py153 def test_file_line_helper(self, mock_open): argument
167 mock_open.assert_called_with(expected_output[0], 'r')
/external/python/cpython3/Lib/test/
Daudiotests.py58 with mock.patch(f"{self.module.__name__}.open") as mock_open, \
61 mock_open.assert_called_with(arg, mode=mode)
Dtest_sax.py199 def mock_open(*args): function
204 with mock.patch('xml.sax.saxutils.open', side_effect=mock_open):
/external/python/cpython3/Misc/NEWS.d/
D3.5.0rc1.rst63 mock_open() now reads binary data correctly when the type of read_data is
D3.5.0b4.rst179 unittest.mock.mock_open().reset_mock would recurse infinitely. Patch from
D3.5.0b3.rst72 mock_open.read_data can now be read from each instance, as it could in
D3.7.1rc1.rst949 :func:`unittest.mock.mock_open` now supports iteration over the file
D3.6.0a1.rst965 mock_open 'files' no longer error on readline at end of file. Patch from
2974 unittest.mock.mock_open().reset_mock would recurse infinitely. Patch from
D3.5.2rc1.rst603 mock_open 'files' no longer error on readline at end of file. Patch from
/external/python/cpython2/Lib/test/
Dtest_sax.py181 def mock_open(*args): function
186 with support.swap_attr(saxutils, 'open', mock_open):
D_mock_backport.py2287 def mock_open(mock=None, read_data=''): function
/external/python/cpython3/Doc/library/
Dunittest.mock.rst2102 mock_open section in Helpers
2105 .. function:: mock_open(mock=None, read_data=None)
2149 >>> m = mock_open()
2165 >>> with patch('__main__.open', mock_open(read_data='bibble')) as m:
/external/pdfium/third_party/pymock/
Dmock.py2319 def mock_open(mock=None, read_data=''): function
/external/python/cpython3/Lib/unittest/
Dmock.py2353 def mock_open(mock=None, read_data=''): function
/external/python/mock/mock/
Dmock.py2471 def mock_open(mock=None, read_data=''): function
/external/python/cpython3/Doc/whatsnew/
D3.4.rst1713 :func:`~mock.mock_open` objects now have ``readline`` and ``readlines``
/external/python/cpython3/Misc/
DHISTORY429 - Issue #23004: mock_open() now reads binary data correctly when the type of
470 - Issue #21750: mock_open.read_data can now be read from each instance, as it
475 - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
5200 - Issue #17467: add readline and readlines support to mock_open in