/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_sidebar.py | 24 def __init__(self, text): 25 self.text = text 26 self.text_frame = self.text.master 27 self.per = Percolator(text) 28 self.undo = Delegator() 29 self.per.insertfilter(self.undo) 31 def setvar(self, name, value): 34 def getlineno(self, inde [all...] |
/third_party/python/Lib/asyncio/ |
H A D | streams.py | 127 def __init__(self, loop=None): 129 self._loop = events._get_event_loop(stacklevel=4) 131 self._loop = loop 132 self._paused = False 133 self._drain_waiters = collections.deque() 134 self._connection_lost = False 136 def pause_writing(self): 137 assert not self._paused 138 self._paused = True 139 if self [all...] |
/third_party/python/Lib/test/ |
H A D | test_smtpd.py | 18 def __init__(self, *args, **kwargs): 19 smtpd.SMTPServer.__init__(self, *args, **kwargs) 20 self.messages = [] 21 if self._decode_data: 22 self.return_status = 'return status' 24 self.return_status = b'return status' 26 def process_message(self, peer, mailfrom, rcpttos, data, **kw): 27 self.messages.append((peer, mailfrom, rcpttos, data)) 28 if data == self.return_status: 39 def listen(self, nu [all...] |
H A D | test_syntax.py | 681 ... def meth(self, *args): 909 ... def f(self): 1840 def _check_error(self, code, errtext, 1853 self.fail("SyntaxError is not a %s" % subclass.__name__) 1856 self.fail("SyntaxError did not contain %r" % (errtext,)) 1857 self.assertEqual(err.filename, filename) 1859 self.assertEqual(err.lineno, lineno) 1861 self.assertEqual(err.offset, offset) 1863 self.assertEqual(err.end_lineno, end_lineno) 1865 self [all...] |
H A D | list_tests.py | 15 def test_init(self): 17 self.assertEqual(self.type2test([]), self.type2test()) 20 a = self.type2test([1, 2, 3]) 22 self.assertEqual(a, self.type2test([])) 25 a = self.type2test([1, 2, 3]) 27 self.assertEqual(a, self [all...] |
H A D | test_bytes.py | 41 def __init__(self, value=0): 42 self.value = value 43 def __index__(self): 44 return self.value 49 def test_basics(self): 50 b = self.type2test() 51 self.assertEqual(type(b), self.type2test) 52 self.assertEqual(b.__class__, self [all...] |
H A D | test_fstring.py | 29 def assertAllRaise(self, exception_type, regex, error_strings): 31 with self.subTest(str=str): 32 with self.assertRaisesRegex(exception_type, regex): 35 def test__format__lookup(self): 38 def __format__(self, spec): 46 y.__format__ = types.MethodType(lambda self, spec: 'instance', y) 48 self.assertEqual(f'{y}', format(y)) 49 self.assertEqual(f'{y}', 'class') 50 self.assertEqual(format(x), format(y)) 55 self [all...] |
/third_party/mbedtls/scripts/mbedtls_dev/ |
H A D | macro_collector.py | 25 def __init__(self, filename: str, line_number: Union[int, str]) -> None: 27 super(ReadFileLineException, self).__init__(message) 28 self.filename = filename 29 self.line_number = line_number 51 def __init__(self, filename: str, binary: bool = False) -> None: 52 self.filename = filename 53 self.file = None #type: Optional[IO[str]] 54 self.line_number = 'entry' #type: Union[int, str] 55 self.generator = None #type: Optional[Iterable[Tuple[int, str]]] 56 self [all...] |
/third_party/python/Lib/ |
H A D | telnetlib.py | 199 def __init__(self, host=None, port=0, 207 self.debuglevel = DEBUGLEVEL 208 self.host = host 209 self.port = port 210 self.timeout = timeout 211 self.sock = None 212 self.rawq = b'' 213 self.irawq = 0 214 self.cookedq = b'' 215 self [all...] |
H A D | ipaddress.py | 390 def exploded(self): 392 return self._explode_shorthand_ip_string() 395 def compressed(self): 397 return str(self) 400 def reverse_pointer(self): 408 return self._reverse_pointer() 411 def version(self): 412 msg = '%200s has no version specified' % (type(self),) 415 def _check_int_address(self, address): 418 raise AddressValueError(msg % (address, self [all...] |
H A D | turtle.py | 253 def __add__(self, other): 254 return Vec2D(self[0]+other[0], self[1]+other[1]) 255 def __mul__(self, other): 257 return self[0]*other[0]+self[1]*other[1] 258 return Vec2D(self[0]*other, self[1]*other) 259 def __rmul__(self, other): 261 return Vec2D(self[ [all...] |
H A D | bdb.py | 31 def __init__(self, skip=None): 32 self.skip = set(skip) if skip else None 33 self.breaks = {} 34 self.fncache = {} 35 self.frame_returning = None 37 self._load_breaks() 39 def canonic(self, filename): 49 canonic = self.fncache.get(filename) 53 self.fncache[filename] = canonic 56 def reset(self) [all...] |
H A D | asynchat.py | 36 for multi-line output), calling self.found_terminator() on its 41 of the connection, you'll have self.terminator set to '\r\n', in 46 you - by calling your self.found_terminator() method. 74 def __init__(self, sock=None, map=None): 76 self.ac_in_buffer = b'' 81 self.incoming = [] 85 self.producer_fifo = deque() 86 asyncore.dispatcher.__init__(self, sock, map) 88 def collect_incoming_data(self, data): 91 def _collect_incoming_data(self, dat [all...] |
/third_party/python/Lib/test/test_importlib/ |
H A D | test_abc.py | 29 def setUp(self): 30 self.superclasses = [getattr(self.abc, class_name) 31 for class_name in self.superclass_names] 32 if hasattr(self, 'subclass_names'): 38 machinery = self.abc.machinery 39 self.subclasses = [getattr(machinery, class_name) 40 for class_name in self.subclass_names] 41 assert self.subclasses or self [all...] |
/third_party/python/Lib/xml/dom/ |
H A D | minidom.py | 43 def __bool__(self): 46 def toxml(self, encoding=None, standalone=None): 47 return self.toprettyxml("", "", encoding, standalone) 49 def toprettyxml(self, indent="\t", newl="\n", encoding=None, 58 if self.nodeType == Node.DOCUMENT_NODE: 60 self.writexml(writer, "", indent, newl, encoding, standalone) 62 self.writexml(writer, "", indent, newl) 68 def hasChildNodes(self): 69 return bool(self.childNodes) 71 def _get_childNodes(self) [all...] |
/third_party/python/Lib/unittest/test/testmock/ |
H A D | testasync.py | 22 def __init__(self): pass 23 async def async_method(self): pass 24 def normal_method(self): pass 34 def __await__(self): yield 43 def a(self): pass 60 def test_is_coroutine_function_patch(self): 63 self.assertTrue(iscoroutinefunction(mock_method)) 66 def test_is_async_patch(self): 70 self.assertTrue(inspect.isawaitable(m)) 76 self [all...] |
/third_party/googletest/googlemock/scripts/generator/cpp/ |
H A D | gmock_class_test.py | 39 def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines): 41 self.assertEqual(expected_lines, self.StripLeadingWhitespace(lines)) 56 def testSimpleMethod(self): 63 self.assertEqualIgnoreLeadingWhitespace( 65 self.GenerateMethodSource(source)) 67 def testSimpleConstructorsAndDestructor(self): 80 self.assertEqualIgnoreLeadingWhitespace( 82 self.GenerateMethodSource(source)) 84 def testVirtualDestructor(self) [all...] |
/third_party/vk-gl-cts/modules/gles3/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): 144 def __init__(self): 147 def uniformVec4(self, count, mn, mx): 154 def uniformBVec4(self, count): 160 # def uniform(self, 229 def __init__(self, [all...] |
/third_party/vk-gl-cts/modules/gles31/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): 144 def __init__(self): 147 def uniformVec4(self, count, mn, mx): 154 def uniformBVec4(self, count): 160 # def uniform(self, 229 def __init__(self, [all...] |
/third_party/mesa3d/src/compiler/nir/ |
H A D | nir_algebraic.py | 86 def __init__(self): 87 self.names = {} 88 self.ids = itertools.count() 89 self.immutable = False; 91 def __getitem__(self, name): 92 if name not in self.names: 93 assert not self.immutable, "Unknown replacement variable: " + name 94 self.names[name] = next(self.ids) 96 return self [all...] |
/kernel/linux/linux-5.10/tools/perf/scripts/python/ |
H A D | exported-sql-viewer.py | 193 def __init__(self, task, param=None, parent=None): 194 super(Thread, self).__init__(parent) 195 self.task = task 196 self.param = param 198 def run(self): 200 if self.param is None: 201 done, result = self.task() 203 done, result = self.task(self.param) 204 self [all...] |
/third_party/python/Lib/distutils/ |
H A D | dist.py | 136 def __init__(self, attrs=None): 148 self.verbose = 1 149 self.dry_run = 0 150 self.help = 0 151 for attr in self.display_option_names: 152 setattr(self, attr, 0) 159 self.metadata = DistributionMetadata() 160 for basename in self.metadata._METHOD_BASENAMES: 162 setattr(self, method_name, getattr(self [all...] |
/third_party/python/Tools/unittestgui/ |
H A D | unittestgui.py | 54 def __init__(self, *args, **kwargs): 55 self.currentResult = None 56 self.running = 0 57 self.__rollbackImporter = RollbackImporter() 58 self.test_suite = None 61 self.directory_to_read = '' 62 self.top_level_dir = '' 63 self.test_file_glob_pattern = 'test*.py' 65 self.initGUI(*args, **kwargs) 67 def errorDialog(self, titl [all...] |
/third_party/mesa3d/src/compiler/isaspec/ |
H A D | isa.py | 42 def __init__(self, bitset): 43 self.match = bitset.match 44 self.dontcare = bitset.dontcare 45 self.mask = bitset.mask 46 self.field_mask = bitset.field_mask; 48 def merge(self, pattern): 50 p.match = p.match | self.match 51 p.dontcare = p.dontcare | self.dontcare 52 p.mask = p.mask | self.mask 53 p.field_mask = p.field_mask | self [all...] |
/third_party/node/deps/v8/tools/unittests/ |
H A D | run_perf_test.py | 100 def testBuildDirectory(self): 103 self.assertEqual(expected_path, 125 def setUp(self): 126 self.maxDiff = None 131 def tearDown(self): 136 def _WriteTestInput(self, json_content): 137 self._test_input = os.path.join(TEST_WORKSPACE, 'test.json') 138 with open(self._test_input, 'w') as f: 141 def _MockCommand(self, *args, **kwargs): 173 self [all...] |