Home
last modified time | relevance | path

Searched refs:Mock (Results 1 - 25 of 91) sorted by relevance

1234

/third_party/python/Lib/unittest/test/testmock/
H A Dtestmock.py12 MagicMock, Mock, NonCallableMock,
60 mock = Mock()
65 self.assertTrue(is_instance(mock.return_value, Mock),
88 mock = Mock(return_value=None)
109 mock = Mock(name='foo')
113 mocks = [(Mock(), 'mock'), (Mock(name='bar'), 'bar')]
128 mock = Mock(spec=X)
131 mock = Mock(spec=X())
134 mock = Mock(spec_se
[all...]
H A Dtestsealable.py15 m = mock.Mock()
17 self.assertIsInstance(m.test, mock.Mock)
18 self.assertIsInstance(m.test(), mock.Mock)
19 self.assertIsInstance(m.test().test2(), mock.Mock)
22 m = mock.Mock()
31 m = mock.Mock()
38 m = mock.Mock()
46 m = mock.Mock()
54 m = mock.Mock()
62 m = mock.Mock(test_valu
[all...]
H A Dtestmagicmethods.py5 from unittest.mock import AsyncMock, Mock, MagicMock, _magics namespace
12 mock = Mock()
15 mock.__getitem__ = Mock()
36 mock = Mock()
50 mock1 = Mock()
51 mock2 = Mock()
53 mock1.__iter__ = Mock(return_value=iter([]))
59 mock = Mock()
60 self.assertEqual(repr(mock), "<Mock id='%s'>" % id(mock))
66 mock = Mock()
[all...]
H A Dtestcallable.py9 Mock, MagicMock, NonCallableMagicMock,
31 self.assertTrue(issubclass(MagicMock, Mock))
37 self.assertTrue(issubclass(type(one.one), Mock))
44 class MockSub(Mock):
/third_party/googletest/googlemock/test/
H A Dgmock_link_test.h30 // Google Mock - a framework for writing C++ mock classes.
104 // This test requires identical definitions of Interface and Mock to be
109 // definitions of Interface and Mock tests MUST be kept in the SAME
209 class Mock : public Interface { class
211 Mock() {} in Mock() function in Mock
224 Mock(const Mock&) = delete;
225 Mock& operator=(const Mock&) = delete;
248 Mock moc in TEST()
[all...]
H A Dgmock-nice-strict_test.cc40 // clash with ::testing::Mock.
41 class Mock { class
43 Mock() {} in Mock() function in Mock
48 Mock(const Mock&) = delete;
49 Mock& operator=(const Mock&) = delete;
195 EXPECT_TRUE(Mock::IsNaggy(&raw_foo)); in TEST()
196 EXPECT_FALSE(Mock::IsNice(&raw_foo)); in TEST()
197 EXPECT_FALSE(Mock in TEST()
[all...]
H A Dgmock-spec-builders_test.cc30 // Google Mock - a framework for writing C++ mock classes.
73 // Tells Google Mock how to print a value of type Incomplete.
79 // use the mock, as long as Google Mock knows how to print the in TEST()
191 // by Google Mock.
252 // promised by Google Mock.
520 // Tests that Google Mock doesn't print a warning when the number of
550 // Tests that Google Mock warns on having too many actions in an
605 // Tests that Google Mock warns on having too few actions in an
987 "Google Mock tried the following 1 expectation, but it didn't match:"); in TEST()
1004 "Google Mock trie in TEST()
[all...]
/third_party/skia/tests/
H A DTDPQueueTest.cpp67 struct Mock { struct
72 static bool LessP(Mock* const& a, Mock* const& b) { return a->fPriority < b->fPriority; } in LessP()
73 static int* PQIndex(Mock* const& mock) { return &mock->fIndex; } in PQIndex()
75 bool operator== (const Mock& that) const { in operator ==()
78 bool operator!= (const Mock& that) const { return !(*this == that); } in operator !=()
83 static const Mock kSentinel = {-1, -1, -1}; in random_test()
86 // Create a random set of Mock objects. in random_test()
88 SkTDArray<Mock> array; in random_test()
91 Mock* moc in random_test()
[all...]
/third_party/mesa3d/bin/
H A Dpost_version_test.py28 @mock.patch('bin.post_version.subprocess.run', mock.Mock())
33 """Mock out side effects."""
34 with mock.patch('bin.post_version.subprocess.run', mock.Mock()), \
44 m = mock.Mock()
45 with mock.patch('bin.post_version.csv.reader', mock.Mock(return_value=data.copy())), \
46 mock.patch('bin.post_version.csv.writer', mock.Mock(return_value=m)):
59 m = mock.Mock()
60 with mock.patch('bin.post_version.csv.reader', mock.Mock(return_value=data.copy())), \
61 mock.patch('bin.post_version.csv.writer', mock.Mock(return_value=m)):
H A Dgen_calendar_entries_test.py55 """Mock out the commit function so no git commits are made durring testing."""
56 with mock.patch('bin.gen_calendar_entries.commit', mock.Mock()):
85 mdate = mock.Mock()
86 mdate.today = mock.Mock(return_value=date)
272 mdate = mock.Mock()
273 mdate.today = mock.Mock(return_value=datetime.date(2021, 1, 6))
/third_party/python/Lib/test/test_asyncio/
H A Dtest_selector_events.py31 self._ssock = mock.Mock()
32 self._csock = mock.Mock()
56 self.selector = mock.Mock()
62 m = mock.Mock()
63 self.loop.add_reader = mock.Mock()
76 m = mock.Mock()
77 self.loop.add_reader = mock.Mock()
78 self.loop.add_writer = mock.Mock()
79 self.loop.remove_reader = mock.Mock()
80 self.loop.remove_writer = mock.Mock()
[all...]
H A Dtest_proactor_events.py39 self.proactor = mock.Mock()
42 self.sock = mock.Mock(socket.socket)
88 tr.close = mock.Mock()
99 tr._fatal_error = mock.Mock()
110 tr._fatal_error = mock.Mock()
118 tr._fatal_error = mock.Mock()
127 tr._fatal_error = mock.Mock()
128 tr._force_close = mock.Mock()
137 tr._fatal_error = mock.Mock()
145 tr._loop_writing = mock.Mock()
[all...]
H A Dtest_base_events.py154 self.loop._selector = mock.Mock()
159 m = mock.Mock()
218 self.loop._process_events = mock.Mock()
219 self.loop._write_to_self = mock.Mock()
226 executor = mock.Mock()
265 self.loop._process_events = mock.Mock()
275 self.loop._process_events = mock.Mock()
342 self.loop._process_events = mock.Mock()
343 self.loop._write_to_self = mock.Mock()
366 self.loop._process_events = mock.Mock()
[all...]
H A Dtest_protocols.py16 f = mock.Mock()
25 f = mock.Mock()
36 f = mock.Mock()
47 f = mock.Mock()
56 f = mock.Mock()
H A Dtest_unix_events.py73 h = asyncio.Handle(mock.Mock(), (),
74 loop=mock.Mock())
77 self.loop.remove_signal_handler = mock.Mock()
394 sock = mock.Mock()
558 f = mock.Mock()
596 fut = mock.Mock()
660 self.pipe = mock.Mock(spec_set=io.RawIOBase)
669 st = mock.Mock()
727 tr._close = mock.Mock()
741 m = mock.Mock()
[all...]
H A Dtest_threads.py27 func = mock.Mock()
33 func = mock.Mock()
45 func = mock.Mock()
H A Dtest_runners.py46 loop._process_events = mock.Mock()
47 # Mock waking event loop from select
48 loop._write_to_self = mock.Mock()
50 loop._selector = mock.Mock()
139 call_exc_handler_mock = mock.Mock()
187 loop.call_exception_handler = mock.Mock()
209 policy.set_event_loop = mock.Mock()
273 loop = mock.Mock()
465 policy.set_event_loop = mock.Mock()
H A Dtest_transports.py31 writer = mock.Mock()
84 loop = mock.Mock()
86 transport._protocol = mock.Mock()
/third_party/skia/third_party/externals/angle2/src/libANGLE/
H A DOverlay.h121 const overlay::Mock *getTextWidget(WidgetId id) const { return &mMock; } in getTextWidget()
122 const overlay::Mock *getCountWidget(WidgetId id) const { return &mMock; } in getCountWidget()
123 const overlay::Mock *getPerSecondWidget(WidgetId id) const { return &mMock; } in getPerSecondWidget()
124 const overlay::Mock *getRunningGraphWidget(WidgetId id) const { return &mMock; } in getRunningGraphWidget()
125 const overlay::Mock *getRunningHistogramWidget(WidgetId id) const { return &mMock; } in getRunningHistogramWidget()
130 overlay::Mock mMock;
142 using CountWidget = const overlay::Mock;
143 using PerSecondWidget = const overlay::Mock;
144 using RunningGraphWidget = const overlay::Mock;
145 using RunningHistogramWidget = const overlay::Mock;
[all...]
/third_party/googletest/googlemock/src/
H A Dgmock-spec-builders.cc30 // Google Mock - a framework for writing C++ mock classes.
70 // Protects the mock object registry (in class Mock), all function
326 Mock::Register(mock_obj, this);
457 // Class Mock.
482 // Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It
525 "testing::Mock::AllowLeak(mock_object), or you may use a " in ~MockObjectRegistry()
550 // Maps a mock object to the reaction Google Mock should have when an
558 // Sets the reaction Google Mock should have when an uninteresting
569 // Tells Google Mock to allow uninteresting calls on the given mock
571 void Mock
[all...]
/third_party/python/Lib/idlelib/idle_test/
H A Dtest_squeezer.py6 from unittest.mock import Mock, NonCallableMagicMock, patch, sentinel, ANY namespace
149 editwin.write = orig_write = Mock(return_value=SENTINEL_VALUE)
176 editwin.write = orig_write = Mock(return_value=SENTINEL_VALUE)
187 editwin.write = orig_write = Mock(return_value=SENTINEL_VALUE)
201 squeezer.count_lines = Mock(return_value=6)
214 squeezer.count_lines = Mock(return_value=6)
241 squeezer.count_lines = Mock(return_value=6)
261 squeezer.count_lines = Mock(return_value=6)
311 squeezer = Mock()
360 retval = expandingbutton.expand(event=Mock())
[all...]
H A Dtest_parenmatch.py11 from unittest.mock import Mock namespace
31 cls.editwin.text_frame = Mock()
103 pm.restore_event = Mock()
H A Dtest_autocomplete.py4 from unittest.mock import Mock, patch namespace
56 acp.autocompletewindow = m = Mock()
85 acp.autocompletewindow = mock = Mock()
86 mock.is_active = Mock(return_value=True)
255 mock = Mock()
256 mock._private = Mock()
289 mock = Mock()
H A Dtest_undo.py9 from unittest.mock import Mock namespace
31 self.delegator.bell = Mock()
98 d.saved_change_hook = Mock()
/third_party/googletest/googlemock/include/gmock/
H A Dgmock-nice-strict.h32 // Given a mock class MockFoo that is created using Google Mock,
94 // Base classes that register and deregister with testing::Mock to alter the
114 ::testing::Mock::AllowUninterestingCalls(reinterpret_cast<uintptr_t>(this)); in NiceMockImpl()
118 ::testing::Mock::UnregisterCallReaction(reinterpret_cast<uintptr_t>(this)); in ~NiceMockImpl()
126 ::testing::Mock::WarnUninterestingCalls(reinterpret_cast<uintptr_t>(this)); in NaggyMockImpl()
130 ::testing::Mock::UnregisterCallReaction(reinterpret_cast<uintptr_t>(this)); in ~NaggyMockImpl()
138 ::testing::Mock::FailUninterestingCalls(reinterpret_cast<uintptr_t>(this)); in StrictMockImpl()
142 ::testing::Mock::UnregisterCallReaction(reinterpret_cast<uintptr_t>(this)); in ~StrictMockImpl()

Completed in 16 milliseconds

1234