Home
last modified time | relevance | path

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

12

/third_party/ltp/tools/sparse/sparse-src/validation/
Dcontext-stmt.c3 __context__(0); // OK in foo()
4 __context__(x, 0); // OK in foo()
5 __context__ (x, 1); // OK in foo()
7 __context__(x); // KO: no const expr in foo()
8 __context__(1,x); // KO: no const expr in foo()
10 __context__; // KO: no expression at all in foo()
11 __context__(; // KO: no expression at all in foo()
13 __context__ 0; // KO: need parens in foo()
14 __context__ x, 0; // KO: need parens in foo()
15 __context__(x, 0; // KO: unmatched parens in foo()
[all …]
Dcontext-unreachable.c5 __context__(1); in foo()
10 __context__(-1); in foo()
Dcontext.c1 #define __cond_lock(c) ((c) ? ({ __context__(1); 1; }) : 0)
5 __context__(1); in a()
10 __context__(-1); in r()
Dreserved.c57 static int (__context__); variable
/third_party/python/Lib/test/
Dtest_contextlib.py741 self.assertIsInstance(exc.__context__, KeyError)
742 self.assertIsInstance(exc.__context__.__context__, AttributeError)
744 self.assertIsNone(exc.__context__.__context__.__context__)
750 self.assertIsInstance(inner_exc.__context__, ZeroDivisionError)
772 self.assertIsInstance(exc.__context__, KeyError)
773 self.assertIsInstance(exc.__context__.__context__, AttributeError)
775 self.assertIsNone(exc.__context__.__context__.__context__)
781 self.assertIsInstance(inner_exc.__context__, ZeroDivisionError)
799 exc.__context__ = None
813 self.assertIsNone(exc.__context__)
[all …]
Dtest_raise.py87 self.assertIsInstance(e.__context__, TypeError)
170 self.assertIsInstance(e.__context__, TypeError)
306 self.assertEqual(e.__context__, context)
318 self.assertNotEqual(e.__context__, context)
319 self.assertIsInstance(e.__context__, context)
331 self.assertNotEqual(e.__context__, context)
332 self.assertIsInstance(e.__context__, context)
343 self.assertIsInstance(e.__context__, ZeroDivisionError)
354 self.assertIsInstance(e.__context__, ZeroDivisionError)
365 self.assertIsNone(e.__context__)
[all …]
Dtest_contextlib_async.py397 context = exc.__context__
402 exc.__context__ = context
544 self.assertIsInstance(exc.__context__, KeyError)
545 self.assertIsInstance(exc.__context__.__context__, AttributeError)
547 self.assertIsNone(exc.__context__.__context__.__context__)
553 self.assertIsInstance(inner_exc.__context__, ZeroDivisionError)
572 exc.__context__ = None
586 self.assertIsNone(exc.__context__)
Dtest_exceptions.py581 self.assertIsNone(e.__context__)
585 self.assertIsNone(e.__context__)
592 self.assertIsNone(e.__context__)
601 self.assertIsNone(e.__context__)
605 e.__context__ = NameError()
607 self.assertIsInstance(e.__context__, NameError)
732 e.__context__ = None
1009 self.assertIsNone(a.__context__)
1010 self.assertIs(b.__context__, a)
1011 self.assertIs(c.__context__, b)
[all …]
Dtest_generators.py185 self.assertIsNone(exc.__context__)
209 self.assertIsNone(cm.exception.__context__)
235 self.assertEqual(type(exc.__context__), ValueError)
264 self.assertEqual(type(exc.__context__), ValueError)
366 context = cm.exception.__context__
380 context = exc.__context__
405 context = cm.exception.__context__
424 has_cycle = (exc is exc.__context__)
Dtest_generator_stop.py26 self.assertIs(type(exc.__context__), StopIteration)
Dtest_coroutines.py1161 self.assertIsNone(result.__context__)
1308 self.assertTrue(exc.__context__ is not None)
1309 self.assertTrue(isinstance(exc.__context__, ZeroDivisionError))
1417 self.assertTrue(exc.__context__ is not None)
1418 self.assertTrue(isinstance(exc.__context__, ZeroDivisionError))
1419 self.assertTrue(isinstance(exc.__context__.__context__,
1442 self.assertTrue(exc.__context__ is None)
Dtest_traceback.py1171 self.assertEqual(None, exc.__context__)
1193 self.assertEqual(None, exc.__context__)
1215 self.assertEqual(exc_context, exc.__context__)
1235 self.assertEqual(exc_context, exc.__context__)
1280 self.assertEqual(None, exc.__context__)
1300 self.assertEqual(exc_context, exc.__context__)
Dtest_yield_from.py289 self.assertIsInstance(e.__context__, GeneratorExit)
871 self.assertIsInstance(e.__context__, GeneratorExit)
Dtest_xmlrpc.py382 self.assertIsNone(exc_ctx.exception.__context__)
401 self.assertIsNone(exc_ctx.exception.__context__)
422 self.assertIsNone(exc_ctx.exception.__context__)
Dtest_io.py1182 self.assertIsInstance(err.exception.__context__, OSError)
1183 self.assertEqual(err.exception.__context__.args, ('flush',))
1203 self.assertIsInstance(err.exception.__context__, NameError)
1204 self.assertIn('non_existing_flush', str(err.exception.__context__))
2137 self.assertIsInstance(err.exception.__context__, NameError)
2138 self.assertIn('writer_non_existing', str(err.exception.__context__))
3340 self.assertIsInstance(err.exception.__context__, OSError)
3341 self.assertEqual(err.exception.__context__.args, ('flush',))
3361 self.assertIsInstance(err.exception.__context__, NameError)
3362 self.assertIn('non_existing_flush', str(err.exception.__context__))
/third_party/python/Lib/
Dtraceback.py550 if (e and e.__context__ is not None
551 and need_context and id(e.__context__) not in _seen):
553 type(e.__context__),
554 e.__context__,
555 e.__context__.__traceback__,
563 te.__context__ = context
567 queue.append((te.__context__, e.__context__))
672 elif (exc.__context__ is not None and
675 chained_exc = exc.__context__
Dcontextlib.py542 exc_context = new_exc.__context__
551 new_exc.__context__ = old_exc
575 fixed_ctx = exc_details[1].__context__
578 exc_details[1].__context__ = fixed_ctx
676 exc_context = new_exc.__context__
685 new_exc.__context__ = old_exc
713 fixed_ctx = exc_details[1].__context__
716 exc_details[1].__context__ = fixed_ctx
/third_party/ltp/tools/sparse/sparse-src/
Dident-list.h73 IDENT_RESERVED(__context__);
/third_party/python/Doc/library/
Dtraceback.rst63 :attr:`__cause__` or :attr:`__context__` attributes of the exception) will be
222 ``__context__`` field is calculated only if ``__cause__`` is ``None`` and
231 .. attribute:: __context__
233 A :class:`TracebackException` of the original ``__context__``.
278 If *chain* is not ``True``, ``__cause__`` and ``__context__`` will not
/third_party/python/Lib/asyncio/
Dfutures.py139 exc.__context__ = self._cancelled_exc
/third_party/ltp/tools/sparse/sparse-src/Documentation/release-notes/
Dv0.4.2.rst122 * sparse test suite: add test mixing __context__ and __attribute__((context(...)))
Dv0.6.0.rst584 * context: __context__(...) expect a constant expression
585 * context: fix crashes while parsing '__context__;' or '__context__(;'
586 * context: stricter syntax for __context__ statement
587 * context: extra warning for __context__() & friends
/third_party/python/Lib/idlelib/
Drun.py246 context = exc.__context__
/third_party/python/Lib/idlelib/idle_test/
Dtest_run.py425 self.assertTrue(isinstance(e.__context__, ZeroDivisionError))
/third_party/python/Lib/test/test_asyncio/
Dtest_tasks.py67 context = exc.__context__
589 chained = exc.__context__
618 has_cycle = (exc is exc.__context__)
620 exc.__context__ = None
1187 chained = cm.exception.__context__
1215 chained = cm.exception.__context__

12