/third_party/skia/third_party/externals/jinja2/ |
H A D | compiler.py | 67 def new_func(self, node, frame, **kwargs): 69 if self.optimized and not frame.eval_ctx.volatile: 70 new_node = self.optimizer.visit(node, frame.eval_ctx) 72 return self.visit(new_node, frame) 73 return f(self, node, frame, **kwargs) 127 def __init__(self, node): 128 self.node = node 129 self.accesses_caller = False 130 self.accesses_kwargs = False 131 self [all...] |
/third_party/python/Lib/test/ |
H A D | test_ipaddress.py | 37 def factory(self): 41 def assertCleanError(self, exc_type, details, *args): 49 cm = self.assertRaisesRegex(exc_type, details) 54 self.assertTrue(exc.exception.__suppress_context__) 56 def assertAddressError(self, details, *args): 58 return self.assertCleanError(ipaddress.AddressValueError, 61 def assertNetmaskError(self, details, *args): 63 return self.assertCleanError(ipaddress.NetmaskValueError, 66 def assertInstancesEqual(self, lhs, rhs): 68 self [all...] |
H A D | test_imaplib.py | 35 def test_Internaldate2tuple(self): 39 self.assertEqual(time.mktime(tt), t0) 42 self.assertEqual(time.mktime(tt), t0) 45 self.assertEqual(time.mktime(tt), t0) 48 def test_Internaldate2tuple_issue10941(self): 49 self.assertNotEqual(imaplib.Internaldate2tuple( 54 def timevalues(self): 66 def test_Time2Internaldate(self): 69 for t in self.timevalues(): 71 self [all...] |
H A D | test_funcattrs.py | 20 def setUp(self): 22 def a(self): 26 self.fi = F() 27 self.F = F 28 self.b = b 30 def cannot_set_attr(self, obj, name, value, exceptions): 36 self.fail("shouldn't be able to set %s to %r" % (name, value)) 42 self.fail("shouldn't be able to del %s" % name) 47 def test_module(self): 48 self [all...] |
H A D | test_with.py | 14 def __init__(self, *args): 16 self.enter_called = False 17 self.exit_called = False 18 self.exit_args = None 20 def __enter__(self): 21 self.enter_called = True 22 return _GeneratorContextManager.__enter__(self) 24 def __exit__(self, type, value, traceback): 25 self.exit_called = True 26 self [all...] |
H A D | test_array.py | 27 def __init__(self, typecode, newarg=None): 28 array.array.__init__(self) 34 def test_array_is_sequence(self): 35 self.assertIsInstance(array.array("B"), collections.abc.MutableSequence) 36 self.assertIsInstance(array.array("B"), collections.abc.Reversible) 38 def test_bad_constructor(self): 39 self.assertRaises(TypeError, array.array) 40 self.assertRaises(TypeError, array.array, spam=42) 41 self.assertRaises(TypeError, array.array, 'xx') 42 self [all...] |
/third_party/python/Lib/ |
H A D | _pyio.py | 365 def _unsupported(self, name): 368 (self.__class__.__name__, name)) 372 def seek(self, pos, whence=0): 386 self._unsupported("seek") 388 def tell(self): 390 return self.seek(0, 1) 392 def truncate(self, pos=None): 398 self._unsupported("truncate") 402 def flush(self): 407 self [all...] |
H A D | threading.py | 113 def __init__(self): 114 self._block = _allocate_lock() 115 self._owner = None 116 self._count = 0 118 def __repr__(self): 119 owner = self._owner 125 "locked" if self._block.locked() else "unlocked", 126 self.__class__.__module__, 127 self.__class__.__qualname__, 129 self [all...] |
H A D | optparse.py | 79 def _repr(self): 80 return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self) 104 def __init__(self, msg): 105 self.msg = msg 107 def __str__(self): 108 return self.msg 117 def __init__(self, msg, option): 118 self [all...] |
/third_party/python/Lib/distutils/command/ |
H A D | install.py | 163 def initialize_options(self): 167 self.prefix = None 168 self.exec_prefix = None 169 self.home = None 170 self.user = 0 175 self.install_base = None 176 self.install_platbase = None 177 self.root = None 183 self.install_purelib = None # for pure module distributions 184 self [all...] |
/foundation/ability/idl_tool/test/hdi_unittest/base/ |
H A D | test_base.py | 28 def __init__(self): 29 self.name = self.__class__.__name__ 30 self._file_name = self.get_file_name() 31 self.working_dir = self.get_working_dir() 32 self._package_path = self.working_dir 33 self [all...] |
/third_party/python/Lib/lib2to3/tests/ |
H A D | test_fixers.py | 17 def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None): 19 fix_list = [self.fixer] 20 self.refactor = support.get_refactorer(fixer_pkg, fix_list, options) 21 self.fixer_log = [] 22 self.filename = "<string>" 24 for fixer in chain(self.refactor.pre_order, 25 self.refactor.post_order): 26 fixer.log = self.fixer_log 28 def _check(self, before, after): 31 tree = self [all...] |
/third_party/python/Lib/test/test_sqlite3/ |
H A D | test_userfunctions.py | 43 def wrapper(self, *args, **kwargs): 46 with check_tracebacks(self, cm, exc, _regex, name): 47 func(self, *args, **kwargs) 50 func(self, *args, **kwargs) 56 def check_tracebacks(self, cm, exc, regex, obj_name): 64 self.assertEqual(cm.unraisable.exc_type, exc) 67 self.assertIsNotNone(regex.search(msg)) 69 self.assertEqual(cm.unraisable.object.__name__, obj_name) 98 def __init__(self): 101 def finalize(self) [all...] |
/third_party/node/tools/inspector_protocol/jinja2/ |
H A D | compiler.py | 64 def new_func(self, node, frame, **kwargs): 66 if self.optimized and not frame.eval_ctx.volatile: 67 new_node = self.optimizer.visit(node, frame.eval_ctx) 69 return self.visit(new_node, frame) 70 return f(self, node, frame, **kwargs) 123 def __init__(self, node): 124 self.node = node 125 self.accesses_caller = False 126 self.accesses_kwargs = False 127 self [all...] |
/third_party/jinja2/ |
H A D | compiler.py | 45 self: "CodeGenerator", node: nodes.Expr, frame: "Frame", **kwargs: t.Any 48 if self.optimizer is not None and not frame.eval_ctx.volatile: 49 new_node = self.optimizer.visit(node, frame.eval_ctx) 52 return self.visit(new_node, frame) 54 return f(self, node, frame, **kwargs) 61 def visitor(self: "CodeGenerator", node: nodes.BinExpr, frame: Frame) -> None: 63 self.environment.sandboxed 64 and op in self.environment.intercepted_binops # type: ignore 66 self.write(f"environment.call_binop(context, {op!r}, ") 67 self [all...] |
/third_party/python/Lib/tkinter/test/test_tkinter/ |
H A D | test_widgets.py | 25 def test_configure_class(self): 26 widget = self.create() 27 self.assertEqual(widget['class'], 29 self.checkInvalidParam(widget, 'class', 'Foo', 31 widget2 = self.create(class_='Foo') 32 self.assertEqual(widget2['class'], 'Foo') 34 def test_configure_colormap(self): 35 widget = self.create() 36 self.assertEqual(widget['colormap'], '') 37 self [all...] |
/third_party/python/Lib/idlelib/ |
H A D | undo.py | 25 def __init__(self): 26 Delegator.__init__(self) 27 self.reset_undo() 29 def setdelegate(self, delegate): 30 if self.delegate is not None: 31 self.unbind("<<undo>>") 32 self.unbind("<<redo>>") 33 self.unbind("<<dump-undo-state>>") 34 Delegator.setdelegate(self, delegate) 36 self [all...] |
H A D | autocomplete_w.py | 29 def __init__(self, widget, tags): 31 self.widget = widget 33 self.tags = tags 35 self.autocompletewindow = self.listbox = self.scrollbar = None 39 self.origselforeground = self.origselbackground = None 41 self.completions = None 43 self [all...] |
/third_party/protobuf/python/ |
H A D | mox.py | 79 def __init__(self, expected_methods): 93 Error.__init__(self) 94 self._expected_methods = expected_methods 96 def __str__(self): 98 for i, m in enumerate(self._expected_methods)]) 109 def __init__(self, unexpected_method, expected): 121 Error.__init__(self) 122 self._unexpected_method = unexpected_method 123 self._expected = expected 125 def __str__(self) [all...] |
/third_party/python/Lib/test/test_asyncio/ |
H A D | test_sendfile.py | 30 def __init__(self, loop=None, close_after=0): 31 self.transport = None 32 self.state = 'INITIAL' 33 self.nbytes = 0 35 self.connected = loop.create_future() 36 self.done = loop.create_future() 37 self.data = bytearray() 38 self.close_after = close_after 40 def _assert_state(self, *expected): 41 if self [all...] |
H A D | test_selector_events.py | 30 def _make_self_pipe(self): 31 self._ssock = mock.Mock() 32 self._csock = mock.Mock() 33 self._internal_fds += 1 35 def _close_self_pipe(self): 54 def setUp(self): 56 self.selector = mock.Mock() 57 self.selector.select.return_value = [] 58 self.loop = TestBaseSelectorEventLoop(self [all...] |
/third_party/python/Lib/email/ |
H A D | _parseaddr.py | 221 def __init__(self, field): 227 self.specials = '()<>@,:;.\"[]' 228 self.pos = 0 229 self.LWS = ' \t' 230 self.CR = '\r\n' 231 self.FWS = self.LWS + self.CR 232 self.atomends = self [all...] |
/third_party/python/Lib/tkinter/test/ |
H A D | widget_tests.py | 18 def scaling(self): 20 return self._scaling 22 self._scaling = float(self.root.call('tk', 'scaling')) 23 return self._scaling 25 def _str(self, value): 26 if not self._stringify and self.wantobjects and tcl_version >= (8, 6): 29 return ' '.join(map(self._str, value)) 32 def assertEqual2(self, actua [all...] |
/third_party/PyYAML/tests/lib/ |
H A D | canonical.py | 9 def __init__(self, data): 15 self.data = data+'\0' 16 self.index = 0 17 self.tokens = [] 18 self.scanned = False 20 def check_token(self, *choices): 21 if not self.scanned: 22 self.scan() 23 if self.tokens: 27 if isinstance(self [all...] |
/third_party/vk-gl-cts/modules/gles2/scripts/ |
H A D | genutil.py | 33 def __init__(self, name, description, children): 34 self.name = name 35 self.description = description 36 self.children = children 39 def __init__(self): 134 def __init__(self): 137 def uniformVec4(self, count, mn, mx): 144 def uniformBVec4(self, count): 150 # def uniform(self, 216 def __init__(self, [all...] |