/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testwith.py | 5 from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call 145 mock = mock_open() 154 mock = mock_open() 166 mock = mock_open() 182 mock_open(mock) 192 mock = mock_open(read_data='foo') 203 mock = mock_open(read_data='foo\nbar\nbaz\n') 215 mock = mock_open(read_data='foo') 225 mock = mock_open(read_data='foo\nbar\nbaz\n') 239 mock = mock_open(read_data='foo\nbar\nbaz\n') [all …]
|
D | testmock.py | 251 a = mock.mock_open() 1845 mocked_open = mock.mock_open(read_data='data') 1855 mocked_open = mock.mock_open(read_data='Remarkable\nNorwegian Blue') 1863 mocked_open = mock.mock_open(read_data='1st line\n2nd line\n3rd line') 1876 mopen = mock.mock_open(read_data='foo\nbarn') 1882 mock_namedtemp = mock.mock_open(mock.MagicMock(name='JLV')) 1892 mopen = mock.mock_open(read_data='foo\nbarn') 1901 _open = mock.mock_open(read_data='foo')
|
D | testpatch.py | 394 def test_open(mock_open): argument 395 m = mock_open.return_value
|
/external/python/mock/mock/tests/ |
D | testwith.py | 10 from mock import MagicMock, Mock, patch, sentinel, mock_open, call 150 mock = mock_open() 159 mock = mock_open() 171 mock = mock_open() 187 mock_open(mock) 197 mock = mock_open(read_data='foo') 208 mock = mock_open(read_data='foo\nbar\nbaz\n') 220 mock = mock_open(read_data='foo') 230 mock = mock_open(read_data='foo\nbar\nbaz\n') 242 mock = mock_open(read_data='foo\nbar\nbaz\n') [all …]
|
D | testmock.py | 269 a = mock.mock_open() 1751 mocked_open = mock.mock_open(read_data='data') 1761 mocked_open = mock.mock_open(read_data='Remarkable\nNorwegian Blue') 1770 mock_namedtemp = mock.mock_open(mock.MagicMock(name='JLV')) 1780 mopen = mock.mock_open(read_data='foo\nbarn') 1790 _open = mock.mock_open(read_data='foo')
|
D | testpatch.py | 393 def test_open(mock_open): argument 394 m = mock_open.return_value
|
/external/toolchain-utils/rust_tools/ |
D | rust_uprev_test.py | 122 mock_open = mock.mock_open(read_data=self.ebuild_file_before) 124 with mock.patch('builtins.open', mock_open): 126 mock_open.return_value.__enter__().write.assert_called_once_with( 131 mock_open = mock.mock_open(read_data=ebuild_file) 133 with mock.patch('builtins.open', mock_open): 145 mock_open = mock.mock_open(read_data=f'RESTRICT="{before}"') 146 with mock.patch('builtins.open', mock_open): 149 mock_open.return_value.__enter__().write.assert_called_once_with( 207 mock_open = mock.mock_open(read_data=package_before) 208 with mock.patch('builtins.open', mock_open): [all …]
|
/external/python/oauth2client/tests/contrib/ |
D | test_locked_file.py | 83 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/ |
D | CHANGELOG.rst | 4 - Issue #31855: :func:`unittest.mock.mock_open` results now respects the 92 - Issue #32933: :func:`unittest.mock.mock_open` now supports iteration over 121 - Issue #26807: mock_open 'files' no longer error on readline at end of file. 140 - Issue #23004: mock_open() now reads binary data correctly when the type of 143 - Issue #21750: mock_open.read_data can now be read from each instance, as it 146 - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely. 194 - Issue #17467: add readline and readlines support to mock_open in
|
/external/toolchain-utils/crosperf/ |
D | experiment_runner_unittest.py | 413 @mock.patch('builtins.open', new_callable=mock.mock_open) 414 def test_store_results(self, mock_open, mock_top_commands, mock_cleanup, argument 443 self.assertEqual(mock_open.call_count, 0) 479 self.assertEqual(mock_open.call_count, 1) 481 mock_open.assert_called_with('/usr/local/crosperf-results/topstats.log', 483 mock_open().write.assert_called()
|
D | results_cache_unittest.py | 1050 mock.mock_open(read_data=TURBOSTAT_LOG_OUTPUT)) as mo: 1060 with mock.patch('builtins.open', mock.mock_open(read_data='')) as mo: 1089 mock.mock_open(read_data=CPUSTATS_UNIQ_OUTPUT)) as mo: 1106 mock.mock_open(read_data=CPUSTATS_DUPL_OUTPUT)) as mo: 1116 with mock.patch('builtins.open', mock.mock_open(read_data='')) as mo: 1128 with mock.patch('builtins.open', mock.mock_open(read_data=TOP_LOG)) as mo: 1138 with mock.patch('builtins.open', mock.mock_open(read_data='')) as mo:
|
/external/python/cpython3/Lib/idlelib/idle_test/ |
D | test_outwin.py | 148 def test_file_line_helper(self, mock_open): argument 162 mock_open.assert_called_with(expected_output[0], 'r')
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.5.0rc1.rst | 63 mock_open() now reads binary data correctly when the type of read_data is
|
D | 3.5.0b4.rst | 179 unittest.mock.mock_open().reset_mock would recurse infinitely. Patch from
|
D | 3.5.0b3.rst | 72 mock_open.read_data can now be read from each instance, as it could in
|
D | 3.8.0b1.rst | 752 :func:`unittest.mock.mock_open` 1385 :func:`unittest.mock.mock_open` results now respects the argument of
|
/external/toolchain-utils/llvm_tools/ |
D | update_packages_and_run_tests_unittest.py | 40 mock.mock_open(read_data='')
|
/external/python/cpython2/Lib/test/ |
D | test_sax.py | 181 def mock_open(*args): function 186 with support.swap_attr(saxutils, 'open', mock_open):
|
D | _mock_backport.py | 2287 def mock_open(mock=None, read_data=''): function
|
/external/python/cpython3/Lib/test/ |
D | test_sax.py | 203 def mock_open(*args): function 208 with mock.patch('xml.sax.saxutils.open', side_effect=mock_open):
|
D | test_codecs.py | 1718 mock_open = mock.mock_open() 1719 with mock.patch('builtins.open', mock_open) as file:
|
/external/python/cpython3/Doc/library/ |
D | unittest.mock.rst | 209 from unittest.mock import mock_open 2441 mock_open section in Helpers 2444 .. function:: mock_open(mock=None, read_data=None) 2488 >>> m = mock_open() 2504 >>> with patch('__main__.open', mock_open(read_data='bibble')) as m:
|
/external/python/google-api-python-client/tests/ |
D | test_http.py | 217 opener = mock.mock_open(file_desc)
|
/external/pdfium/third_party/pymock/ |
D | mock.py | 2319 def mock_open(mock=None, read_data=''): function
|
/external/python/mock/mock/ |
D | mock.py | 2505 def mock_open(mock=None, read_data=''): function
|