Searched refs:mock_open (Results 1 – 18 of 18) sorted by relevance
/third_party/python/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 | 279 a = mock.mock_open() 1882 mocked_open = mock.mock_open(read_data='data') 1892 mocked_open = mock.mock_open(read_data='Remarkable\nNorwegian Blue') 1900 mocked_open = mock.mock_open(read_data='1st line\n2nd line\n3rd line') 1913 mopen = mock.mock_open(read_data='foo\nbarn') 1919 mock_namedtemp = mock.mock_open(mock.MagicMock(name='JLV')) 1929 mopen = mock.mock_open(read_data='foo\nbarn') 1938 _open = mock.mock_open(read_data='foo')
|
D | testpatch.py | 394 def test_open(mock_open): argument 395 m = mock_open.return_value
|
/third_party/python/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')
|
/third_party/python/Lib/test/ |
D | test_mimetypes.py | 83 return_value=fp) as mock_open: 85 mock_open.assert_called_with(filename, encoding='utf-8')
|
D | test_sax.py | 207 def mock_open(*args): function 212 with mock.patch('xml.sax.saxutils.open', side_effect=mock_open):
|
D | test_codecs.py | 1732 mock_open = mock.mock_open() 1733 with mock.patch('builtins.open', mock_open) as file:
|
/third_party/python/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
|
D | 3.6.0a1.rst | 965 mock_open 'files' no longer error on readline at end of file. Patch from 2973 unittest.mock.mock_open().reset_mock would recurse infinitely. Patch from
|
D | 3.5.2rc1.rst | 603 mock_open 'files' no longer error on readline at end of file. Patch from
|
D | 3.8.0a1.rst | 4956 :func:`unittest.mock.mock_open` now supports iteration over the file
|
/third_party/python/Doc/library/ |
D | unittest.mock.rst | 209 from unittest.mock import mock_open 2442 mock_open section in Helpers 2445 .. function:: mock_open(mock=None, read_data=None) 2489 >>> m = mock_open() 2505 >>> with patch('__main__.open', mock_open(read_data='bibble')) as m:
|
/third_party/python/Lib/unittest/ |
D | mock.py | 2815 def mock_open(mock=None, read_data=''): function
|
/third_party/python/Doc/whatsnew/ |
D | 3.4.rst | 1713 :func:`~mock.mock_open` objects now have ``readline`` and ``readlines``
|
/third_party/python/Misc/ |
D | HISTORY | 429 - 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
|