Home
last modified time | relevance | path

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

1234567891011

/external/python/mock/mock/tests/
Dtestsentinel.py8 from mock import sentinel, DEFAULT
14 self.assertEqual(sentinel.whatever, sentinel.whatever,
16 self.assertNotEqual(sentinel.whatever, sentinel.whateverelse,
21 self.assertEqual(str(sentinel.whatever), 'sentinel.whatever',
26 self.assertIs(DEFAULT, sentinel.DEFAULT)
30 self.assertRaises(AttributeError, lambda: sentinel.__bases__)
34 pickled = pickle.dumps(sentinel.whatever, proto)
36 self.assertIs(unpickled, sentinel.whatever)
39 self.assertIs(copy.copy(sentinel.whatever), sentinel.whatever)
40 self.assertIs(copy.deepcopy(sentinel.whatever), sentinel.whatever)
Dtestwith.py10 from mock import MagicMock, Mock, patch, sentinel, mock_open, call
13 something = sentinel.Something
14 something_else = sentinel.SomethingElse
23 with patch('%s.something' % __name__, sentinel.Something2):
24 self.assertEqual(something, sentinel.Something2, "unpatched")
25 self.assertEqual(something, sentinel.Something)
30 with patch('%s.something' % __name__, sentinel.Something2):
31 self.assertEqual(something, sentinel.Something2, "unpatched")
33 self.assertEqual(something, sentinel.Something)
41 self.assertEqual(something, sentinel.Something)
[all …]
Dtestpatch.py15 NonCallableMock, CallableMixin, patch, sentinel,
45 something = sentinel.Something
46 something_else = sentinel.SomethingElse
102 attribute = sentinel.Original
104 @patch.object(Something, 'attribute', sentinel.Patched)
106 self.assertEqual(Something.attribute, sentinel.Patched, "unpatched")
109 self.assertEqual(Something.attribute, sentinel.Original,
115 attribute = sentinel.Original
122 self.assertEqual(Something.attribute, sentinel.Original,
128 attribute = sentinel.Original
[all …]
Dtestmock.py16 call, DEFAULT, patch, sentinel,
185 mock = Mock(side_effect=sentinel.SideEffect)
186 self.assertEqual(mock.side_effect, sentinel.SideEffect,
191 mock = Mock(side_effect=side_effect, return_value=sentinel.RETURN)
192 self.assertEqual(mock(), sentinel.RETURN)
224 mock(sentinel.Something, something=sentinel.SomethingElse)
227 mock.side_effect = sentinel.SideEffect
249 self.assertEqual(mock.side_effect, sentinel.SideEffect,
282 ret_val = mock(sentinel.Arg)
285 self.assertEqual(mock.call_args, ((sentinel.Arg,), {}),
[all …]
/external/python/cpython3/Lib/unittest/test/testmock/
Dtestsentinel.py4 from unittest.mock import sentinel, DEFAULT
10 self.assertEqual(sentinel.whatever, sentinel.whatever,
12 self.assertNotEqual(sentinel.whatever, sentinel.whateverelse,
17 self.assertEqual(str(sentinel.whatever), 'sentinel.whatever',
22 self.assertIs(DEFAULT, sentinel.DEFAULT)
26 self.assertRaises(AttributeError, lambda: sentinel.__bases__)
31 pickled = pickle.dumps(sentinel.whatever, proto)
33 self.assertIs(unpickled, sentinel.whatever)
36 self.assertIs(copy.copy(sentinel.whatever), sentinel.whatever)
37 self.assertIs(copy.deepcopy(sentinel.whatever), sentinel.whatever)
Dtestwith.py5 from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call
9 something = sentinel.Something
10 something_else = sentinel.SomethingElse
19 with patch('%s.something' % __name__, sentinel.Something2):
20 self.assertEqual(something, sentinel.Something2, "unpatched")
21 self.assertEqual(something, sentinel.Something)
26 with patch('%s.something' % __name__, sentinel.Something2):
27 self.assertEqual(something, sentinel.Something2, "unpatched")
29 self.assertEqual(something, sentinel.Something)
37 self.assertEqual(something, sentinel.Something)
[all …]
Dtestpatch.py15 NonCallableMock, CallableMixin, sentinel,
42 something = sentinel.Something
43 something_else = sentinel.SomethingElse
99 attribute = sentinel.Original
101 @patch.object(Something, 'attribute', sentinel.Patched)
103 self.assertEqual(Something.attribute, sentinel.Patched, "unpatched")
106 self.assertEqual(Something.attribute, sentinel.Original,
116 attribute = sentinel.Original
123 self.assertEqual(Something.attribute, sentinel.Original,
129 attribute = sentinel.Original
[all …]
Dtestmock.py11 call, DEFAULT, patch, sentinel,
166 mock = Mock(side_effect=sentinel.SideEffect)
167 self.assertEqual(mock.side_effect, sentinel.SideEffect,
172 mock = Mock(side_effect=side_effect, return_value=sentinel.RETURN)
173 self.assertEqual(mock(), sentinel.RETURN)
206 mock(sentinel.Something, something=sentinel.SomethingElse)
209 mock.side_effect = sentinel.SideEffect
231 self.assertEqual(mock.side_effect, sentinel.SideEffect,
264 ret_val = mock(sentinel.Arg)
267 self.assertEqual(mock.call_args, ((sentinel.Arg,), {}),
[all …]
/external/libxml2/
Dlist.c40 xmlLinkPtr sentinel; member
104 … for(lk = l->sentinel->next;lk != l->sentinel && l->linkCompare(lk->data, data) <0 ;lk = lk->next); in xmlListLowerSearch()
124 … for(lk = l->sentinel->prev;lk != l->sentinel && l->linkCompare(lk->data, data) >0 ;lk = lk->prev); in xmlListHigherSearch()
144 if (lk == l->sentinel) in xmlListLinkSearch()
169 if (lk == l->sentinel) in xmlListLinkReverseSearch()
200 if (NULL ==(l->sentinel = (xmlLinkPtr )xmlMalloc(sizeof(xmlLink)))) { in xmlListCreate()
206 l->sentinel->next = l->sentinel; in xmlListCreate()
207 l->sentinel->prev = l->sentinel; in xmlListCreate()
208 l->sentinel->data = NULL; in xmlListCreate()
339 xmlFree(l->sentinel); in xmlListDelete()
[all …]
/external/clang/test/SemaObjC/
Dmethod-sentinel-attr.m8 - (void) foo1 : (int)x, ... ATTR; // expected-note {{method has been explicitly marked sentinel her…
9 - (void) foo3 : (int)x __attribute__ ((__sentinel__)) ; // expected-warning {{'sentinel' attribute …
10 …tribute__ ((__sentinel__(1))); // expected-note {{method has been explicitly marked sentinel here}}
11 …tribute__ ((__sentinel__(5))); // expected-note {{method has been explicitly marked sentinel here}}
12 …tribute__ ((__sentinel__(0))); // expected-note {{method has been explicitly marked sentinel here}}
14 - (void) foo9 : (int)x, ... __attribute__ ((__sentinel__(-1))); // expected-error {{'sentinel' par…
17 - (void) foo12 : (int)x, ... ATTR; // expected-note {{method has been explicitly marked sentinel he…
20 - (id) foo13 : (id)firstObj, ... __attribute__((sentinel(0,1))); argument
21 - (id) foo14 : (id)firstObj : (Class)secondObj, ... __attribute__((sentinel(0,1))); argument
22 - (id) foo15 : (id*)firstObj, ... __attribute__((sentinel(0,1))); argument
[all …]
/external/llvm-project/clang/test/SemaObjC/
Dmethod-sentinel-attr.m8 - (void) foo1 : (int)x, ... ATTR; // expected-note {{method has been explicitly marked sentinel her…
9 - (void) foo3 : (int)x __attribute__ ((__sentinel__)) ; // expected-warning {{'sentinel' attribute …
10 …tribute__ ((__sentinel__(1))); // expected-note {{method has been explicitly marked sentinel here}}
11 …tribute__ ((__sentinel__(5))); // expected-note {{method has been explicitly marked sentinel here}}
12 …tribute__ ((__sentinel__(0))); // expected-note {{method has been explicitly marked sentinel here}}
14 - (void) foo9 : (int)x, ... __attribute__ ((__sentinel__(-1))); // expected-error {{'sentinel' par…
17 - (void) foo12 : (int)x, ... ATTR; // expected-note {{method has been explicitly marked sentinel he…
20 - (id) foo13 : (id)firstObj, ... __attribute__((sentinel(0,1))); argument
21 - (id) foo14 : (id)firstObj : (Class)secondObj, ... __attribute__((sentinel(0,1))); argument
22 - (id) foo15 : (id*)firstObj, ... __attribute__((sentinel(0,1))); argument
[all …]
/external/clang/test/Sema/
Dsentinel-attribute.c6 int x __attribute__((sentinel)); //expected-warning{{'sentinel' attribute only applies to functions…
8 void f1(int a, ...) __attribute__ ((sentinel)); // expected-note {{function has been explicitly mar…
9 void f2(int a, ...) __attribute__ ((sentinel(1)));
11 void f3(int a, ...) __attribute__ ((sentinel("hello"))); //expected-error{{'sentinel' attribute req…
12 void f4(int a, ...) __attribute__ ((sentinel(1, 2, 3))); //expected-error{{'sentinel' attribute tak…
13 void f4(int a, ...) __attribute__ ((sentinel(-1))); //expected-error{{parameter 1 less than zero}}
14 void f4(int a, ...) __attribute__ ((sentinel(0, 2))); // expected-error{{parameter 2 not 0 or 1}}
16 void f5(int a) __attribute__ ((sentinel)); //expected-warning{{'sentinel' attribute only supported …
/external/llvm-project/clang/test/Sema/
Dsentinel-attribute.c6 int x __attribute__((sentinel)); //expected-warning{{'sentinel' attribute only applies to functions…
8 void f1(int a, ...) __attribute__ ((sentinel)); // expected-note {{function has been explicitly mar…
9 void f2(int a, ...) __attribute__ ((sentinel(1)));
11 void f3(int a, ...) __attribute__ ((sentinel("hello"))); //expected-error{{'sentinel' attribute req…
12 void f4(int a, ...) __attribute__ ((sentinel(1, 2, 3))); //expected-error{{'sentinel' attribute tak…
13 void f4(int a, ...) __attribute__ ((sentinel(-1))); //expected-error{{parameter 1 less than zero}}
14 void f4(int a, ...) __attribute__ ((sentinel(0, 2))); // expected-error{{parameter 2 not 0 or 1}}
16 void f5(int a) __attribute__ ((sentinel)); //expected-warning{{'sentinel' attribute only supported …
/external/openscreen/cast/streaming/
Dpacket_receive_stats_tracker_unittest.cc36 const RtcpReportBlock sentinel = GetSentinel(); \
37 EXPECT_EQ(sentinel.ssrc, (x).ssrc); \
38 EXPECT_EQ(sentinel.packet_fraction_lost_numerator, \
40 EXPECT_EQ(sentinel.cumulative_packets_lost, (x).cumulative_packets_lost); \
41 EXPECT_EQ(sentinel.extended_high_sequence_number, \
43 EXPECT_EQ(sentinel.jitter, (x).jitter); \
44 EXPECT_EQ(sentinel.last_status_report_id, (x).last_status_report_id); \
45 EXPECT_EQ(sentinel.delay_since_last_report, (x).delay_since_last_report); \
52 const RtcpReportBlock sentinel = GetSentinel(); \
54 EXPECT_EQ(sentinel.ssrc, (x).ssrc); \
[all …]
/external/chromium-trace/catapult/common/py_vulcanize/third_party/rcssmin/
Drcssmin.c30 const rchar *sentinel; member
188 && source < ctx->sentinel && target < ctx->tsentinel in copy_match()
220 && source < ctx->sentinel && target < ctx->tsentinel in copy_imatch()
248 copy(const rchar *source, const rchar *sentinel, rchar **target_, in copy() argument
253 while (source < sentinel && target < ctx->tsentinel) in copy()
258 return (source == sentinel); in copy()
275 if (source < ctx->sentinel && !(target < ctx->tsentinel)) { \
301 if (source < ctx->sentinel && target < ctx->tsentinel) { in copy_escape()
310 if (ctx->sentinel - source > 5) in copy_escape()
313 hsentinel = ctx->sentinel; in copy_escape()
[all …]
/external/chromium-trace/catapult/common/py_vulcanize/third_party/rjsmin/
Drjsmin.c94 *sentinel = source + length; in rjsmin() local
99 while (source < sentinel) { in rjsmin()
119 while (source < sentinel) { in rjsmin()
130 if (source < sentinel) { in rjsmin()
133 if (c == U('\r') && source < sentinel in rjsmin()
147 if (!(source < sentinel)) { in rjsmin()
192 while (source < sentinel) { in rjsmin()
202 if (source < sentinel) { in rjsmin()
210 while (source < sentinel) { in rjsmin()
217 if (source < sentinel) { in rjsmin()
[all …]
/external/python/google-api-python-client/tests/
Dtest__auth.py37 default.return_value = (mock.sentinel.credentials, mock.sentinel.project)
41 self.assertEqual(credentials, mock.sentinel.credentials)
46 returned = _auth.with_scopes(credentials, mock.sentinel.scopes)
59 returned = _auth.with_scopes(credentials, mock.sentinel.scopes)
63 credentials.with_scopes.assert_called_once_with(mock.sentinel.scopes)
92 default.return_value = mock.sentinel.credentials
96 self.assertEqual(credentials, mock.sentinel.credentials)
101 returned = _auth.with_scopes(credentials, mock.sentinel.scopes)
109 returned = _auth.with_scopes(credentials, mock.sentinel.scopes)
113 credentials.create_scoped.assert_called_once_with(mock.sentinel.scopes)
/external/clang/test/SemaCXX/
Dattr-sentinel.cpp3 void f(int, ...) __attribute__((sentinel));
12 S(int,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
13 void a(int,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
14 void* operator new(size_t,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
15 void operator()(int,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
/external/llvm-project/clang/test/SemaCXX/
Dattr-sentinel.cpp3 void f(int, ...) __attribute__((sentinel));
12 S(int,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
13 void a(int,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
14 void* operator new(size_t,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
15 void operator()(int,...) __attribute__((sentinel)); // expected-note {{marked sentinel}}
/external/clang/test/FixIt/
Dfixit-objc.m60 void sentinel(int x, ...) __attribute__((sentinel)); // expected-note{{function has been explicitly… function
63 - (void)sentinel:(int)x, ... __attribute__((sentinel)); // expected-note{{method has been explicitl… argument
67 sentinel(1, 2, 3); // expected-warning{{missing sentinel in function call}}
68 [a sentinel:1, 2, 3]; // expected-warning{{missing sentinel in method dispatch}}
/external/llvm-project/clang/test/FixIt/
Dfixit-objc.m60 void sentinel(int x, ...) __attribute__((sentinel)); // expected-note{{function has been explicitly… function
63 - (void)sentinel:(int)x, ... __attribute__((sentinel)); // expected-note{{method has been explicitl… argument
67 sentinel(1, 2, 3); // expected-warning{{missing sentinel in function call}}
68 [a sentinel:1, 2, 3]; // expected-warning{{missing sentinel in method dispatch}}
/external/python/cpython3/Lib/multiprocessing/
Dpopen_forkserver.py51 self.sentinel, w = forkserver.connect_to_new_process(self._fds)
56 (_parent_w, self.sentinel))
59 self.pid = forkserver.read_signed(self.sentinel)
65 if not wait([self.sentinel], timeout):
68 self.returncode = forkserver.read_signed(self.sentinel)
/external/mesa3d/src/util/
Dsparse_array.c220 uint32_t sentinel, in util_sparse_array_free_list_init() argument
223 fl->head = sentinel; in util_sparse_array_free_list_init()
225 fl->sentinel = sentinel; in util_sparse_array_free_list_init()
240 assert(items[0] != fl->sentinel); in util_sparse_array_free_list_push()
245 assert(items[i] != fl->sentinel); in util_sparse_array_free_list_push()
267 if ((uint32_t)current_head == fl->sentinel) in util_sparse_array_free_list_pop_idx()
268 return fl->sentinel; in util_sparse_array_free_list_pop_idx()
288 if ((uint32_t)current_head == fl->sentinel) in util_sparse_array_free_list_pop_elem()
/external/mesa3d/.gitlab-ci/bare-metal/
Dserial_buffer.py46 self.sentinel = object()
71 self.byte_queue.put(self.sentinel)
95 if bytes == self.sentinel:
97 self.line_queue.put(self.sentinel)
120 if line == self.sentinel:
125 return iter(self.get_line, self.sentinel)
/external/tensorflow/tensorflow/core/profiler/convert/
Dop_stats_to_tf_stats.cc55 TfStatsRecord sentinel; in GenerateTfStatsTable() local
56 sentinel.set_rank(0); in GenerateTfStatsTable()
57 sentinel.set_device_cumulative_total_self_time_as_fraction(0.0); in GenerateTfStatsTable()
58 sentinel.set_host_cumulative_total_self_time_as_fraction(0.0); in GenerateTfStatsTable()
59 const TfStatsRecord* prev_record = &sentinel; in GenerateTfStatsTable()

1234567891011