/third_party/python/Lib/lib2to3/tests/ |
H A D | test_pytree.py | 29 def test_instantiate_base(self): 32 self.assertRaises(AssertionError, pytree.Base) 34 def test_leaf(self): 36 self.assertEqual(l1.type, 100) 37 self.assertEqual(l1.value, "foo") 39 def test_leaf_repr(self): 41 self.assertEqual(repr(l1), "Leaf(100, 'foo')") 43 def test_leaf_str(self): 45 self.assertEqual(str(l1), "foo") 47 self [all...] |
/third_party/python/Lib/ |
H A D | reprlib.py | 15 def wrapper(self): 16 key = id(self), get_ident() 21 result = user_function(self) 38 def __init__(self): 39 self.fillvalue = '...' 40 self.maxlevel = 6 41 self.maxtuple = 6 42 self.maxlist = 6 43 self.maxarray = 5 44 self [all...] |
H A D | lzma.py | 49 def __init__(self, filename=None, mode="r", *, 93 self._fp = None 94 self._closefp = False 95 self._mode = _MODE_CLOSED 111 self._compressor = LZMACompressor(format=format, check=check, 113 self._pos = 0 120 self._fp = builtins.open(filename, mode) 121 self._closefp = True 122 self._mode = mode_code 124 self [all...] |
/third_party/python/Lib/idlelib/idle_test/ |
H A D | mock_tk.py | 24 def __init__(self, **kwds): 26 self.__dict__.update(kwds) 31 def __init__(self, master=None, value=None, name=None): 32 self.master = master 33 self.value = value 34 self.name = name 35 def set(self, value): 36 self.value = value 37 def get(self): 38 return self [all...] |
H A D | test_browser.py | 34 def test_init(self): 35 mb = self.mb 36 eq = self.assertEqual 39 self.assertIsInstance(mb.node, TreeNode) 40 self.assertIsNotNone(browser.file_open) 42 def test_settitle(self): 43 mb = self.mb 44 self.assertIn(os.path.basename(__file__), mb.top.title()) 45 self.assertEqual(mb.top.iconname(), 'Module Browser') 47 def test_rootnode(self) [all...] |
/third_party/python/Lib/test/test_peg_generator/ |
H A D | test_c_parser.py | 48 self, 58 with self.assertRaises(SyntaxError): 61 def verify_ast_generation(self, stmt): 64 self.assertEqual(ast_dump(expected_ast), ast_dump(actual_ast)) 66 def test_parse(self): 92 def setUp(self): 93 self._backup_config_vars = dict(sysconfig._CONFIG_VARS) 96 self.skipTest("The %r command is not found" % cmd) 97 self.old_cwd = os.getcwd() 98 self [all...] |
/third_party/vk-gl-cts/scripts/android/ |
H A D | build_apk.py | 47 def __init__(self, path, desired_version): 48 self.path = path 49 self.buildToolsVersion = SDKEnv.selectBuildToolsVersion(self.path, desired_version) 82 def getPlatformLibrary (self, apiVersion): 83 return os.path.join(self.path, "platforms", "android-%d" % apiVersion, "android.jar") 85 def getBuildToolsPath (self): 86 return os.path.join(self.path, "build-tools", "%d.%d.%d" % self.buildToolsVersion) 89 def __init__(self, pat [all...] |
/third_party/mesa3d/bin/pick/ |
H A D | ui.py | 46 def __init__(self, *args, ui: 'UI', **kwargs): 48 self.ui = ui 50 def keypress(self, size: int, key: str) -> typing.Optional[str]: 54 asyncio.ensure_future(self.ui.update()) 56 self.ui.add() 68 def __init__(self, ui: 'UI', commit: 'core.Commit'): 71 self.ui = ui 72 self.commit = commit 74 async def apply(self) -> None: 75 async with self [all...] |
/third_party/python/Lib/curses/ |
H A D | textpad.py | 43 def __init__(self, win, insert_mode=False): 44 self.win = win 45 self.insert_mode = insert_mode 46 self._update_max_yx() 47 self.stripspaces = 1 48 self.lastcmd = None 51 def _update_max_yx(self): 52 maxy, maxx = self.win.getmaxyx() 53 self.maxy = maxy - 1 54 self [all...] |
/third_party/python/Lib/test/ |
H A D | test_super.py | 7 def f(self): 14 def f(self): 21 def f(self): 28 def f(self): 45 def tearDown(self): 50 def test_basics_working(self): 51 self.assertEqual(D().f(), 'ABCD') 53 def test_class_getattr_working(self): 54 self.assertEqual(D.f(D()), 'ABCD') 56 def test_subclass_no_override_working(self) [all...] |
H A D | test_list.py | 10 def test_basic(self): 11 self.assertEqual(list([]), []) 14 self.assertEqual(l0_3, l0_3_bis) 15 self.assertTrue(l0_3 is not l0_3_bis) 16 self.assertEqual(list(()), []) 17 self.assertEqual(list((0, 1, 2, 3)), [0, 1, 2, 3]) 18 self.assertEqual(list(''), []) 19 self.assertEqual(list('spam'), ['s', 'p', 'a', 'm']) 20 self.assertEqual(list(x for x in range(10) if x % 2), 38 self [all...] |
H A D | test_subclassinit.py | 6 def test_init_subclass(self): 17 self.assertFalse(A.initialized) 18 self.assertTrue(B.initialized) 20 def test_init_subclass_dict(self): 31 self.assertFalse(A.initialized) 32 self.assertTrue(B.initialized) 34 def test_init_subclass_kwargs(self): 42 self.assertEqual(B.kwargs, dict(x=3)) 44 def test_init_subclass_error(self): 49 with self [all...] |
H A D | test_mmap.py | 34 def setUp(self): 38 def tearDown(self): 44 def test_basic(self): 62 self.assertEqual(m.find(b'foo'), PAGESIZE) 64 self.assertEqual(len(m), 2*PAGESIZE) 66 self.assertEqual(m[0], 0) 67 self.assertEqual(m[0:3], b'\0\0\0') 70 self.assertRaises(IndexError, m.__getitem__, len(m)) 71 self.assertRaises(IndexError, m.__setitem__, len(m), b'\0') 78 self [all...] |
H A D | test_file_eintr.py | 29 def setUp(self): 30 self._process = None 32 def tearDown(self): 33 if self._process and self._process.poll() is None: 35 self._process.kill() 39 def _generate_infile_setup_code(self): 46 self.modname) 48 def fail_with_process_info(self, why, stdout=b'', stderr=b'', 62 if self [all...] |
H A D | test_uuid.py | 35 def test_safe_uuid_enum(self): 42 def test_UUID(self): 43 equal = self.assertEqual 55 0, 0, self.uuid.RESERVED_NCS, None), 64 0x607040500010203, 0x809, self.uuid.RESERVED_NCS, None), 73 0x82e946702d9e6d5, 0xf9b, self.uuid.RFC_4122, 3), 82 0x678123412345678, 0x1234, self.uuid.RESERVED_NCS, None), 91 0x1d19dad6ba7b810, 0xb4, self.uuid.RFC_4122, 1), 100 0x1d19dad6ba7b811, 0xb4, self.uuid.RFC_4122, 1), 109 0x1d19dad6ba7b812, 0xb4, self [all...] |
/third_party/python/Lib/test/test_importlib/ |
H A D | test_main.py | 30 def test_retrieves_version_of_self(self): 33 assert re.match(self.version_pattern, dist.version) 35 def test_for_name_does_not_exist(self): 36 with self.assertRaises(PackageNotFoundError): 39 def test_package_not_found_mentions_metadata(self): 46 with self.assertRaises(PackageNotFoundError) as ctx: 51 def test_new_style_classes(self): 52 self.assertIsInstance(Distribution, type) 58 def test_invalid_inputs_to_from_name(self, name): 59 with self [all...] |
/third_party/PyYAML/lib/yaml/ |
H A D | composer.py | 13 def __init__(self): 14 self.anchors = {} 16 def check_node(self): 18 if self.check_event(StreamStartEvent): 19 self.get_event() 22 return not self.check_event(StreamEndEvent) 24 def get_node(self): 26 if not self.check_event(StreamEndEvent): 27 return self.compose_document() 29 def get_single_node(self) [all...] |
/third_party/python/Lib/multiprocessing/ |
H A D | resource_sharer.py | 29 def __init__(self, sock): 34 self._id = _resource_sharer.register(send, new_sock.close) 36 def detach(self): 38 with _resource_sharer.get_connection(self._id) as conn: 47 def __init__(self, fd): 53 self._id = _resource_sharer.register(send, close) 55 def detach(self): 57 with _resource_sharer.get_connection(self._id) as conn: 63 def __init__(self): 64 self [all...] |
/third_party/python/Lib/lib2to3/pgen2/ |
H A D | parse.py | 19 def __init__(self, msg, type, value, context): 20 Exception.__init__(self, "%s: type=%r, value=%r, context=%r" % 22 self.msg = msg 23 self.type = type 24 self.value = value 25 self.context = context 27 def __reduce__(self): 28 return type(self), (self.msg, self [all...] |
/third_party/python/Lib/msilib/ |
H A D | __init__.py | 35 def __init__(self, name): 36 self.name = name 37 self.fields = [] 39 def add_field(self, index, name, type): 40 self.fields.append((index,name,type)) 42 def sql(self): 45 self.fields.sort() 46 fields = [None]*len(self.fields) 47 for index, name, type in self.fields: 51 print("%s.%s unknown bits %x" % (self [all...] |
/third_party/python/Lib/asyncio/ |
H A D | timeouts.py | 33 def __init__(self, when: Optional[float]) -> None: 40 self._state = _State.CREATED 42 self._timeout_handler: Optional[events.TimerHandle] = None 43 self._task: Optional[tasks.Task] = None 44 self._when = when 46 def when(self) -> Optional[float]: 48 return self._when 50 def reschedule(self, when: Optional[float]) -> None: 52 assert self._state is not _State.CREATED 53 if self [all...] |
/third_party/python/Lib/test/test_tools/ |
H A D | test_md5sum.py | 30 def test_noargs(self): 31 rc, out, err = assert_python_ok(self.script) 32 self.assertEqual(rc, 0) 33 self.assertTrue( 35 self.assertFalse(err) 37 def test_checksum_fodder(self): 38 rc, out, err = assert_python_ok(self.script, self.fodder) 39 self.assertEqual(rc, 0) 40 self [all...] |
/third_party/mbedtls/scripts/mbedtls_dev/ |
H A D | crypto_knowledge.py | 71 def __init__(self, name: str, params: Optional[Iterable[str]] = None) -> None: 82 self.name = name.strip() 86 name of the macro, and the arguments are in `self.params`. 89 if '(' in self.name: 90 m = re.match(r'(\w+)\s*\((.*)\)\Z', self.name) 92 self.name = m.group(1) 94 self.params = (None if params is None else 100 assert re.match(r'PSA_KEY_TYPE_\w+\Z', self.name) 102 self.expression = self [all...] |
/third_party/node/tools/inspector_protocol/jinja2/ |
H A D | utils.py | 313 def __init__(self, capacity): 314 self.capacity = capacity 315 self._mapping = {} 316 self._queue = deque() 317 self._postinit() 319 def _postinit(self): 321 self._popleft = self._queue.popleft 322 self._pop = self [all...] |
/third_party/python/Lib/tkinter/test/test_ttk/ |
H A D | test_extensions.py | 12 def tearDown(self): 13 self.root.update_idletasks() 16 def test_widget_destroy(self): 18 x = ttk.LabeledScale(self.root) 22 self.assertRaises(tkinter.TclError, x.tk.globalgetvar, var) 25 myvar = tkinter.DoubleVar(self.root) 27 x = ttk.LabeledScale(self.root, variable=myvar) 29 if self.wantobjects: 30 self.assertEqual(x.tk.globalgetvar(name), myvar.get()) 32 self [all...] |