/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_searchengine.py | 32 def __init__(self, *args, **kwargs): pass 36 def test_get(self): 42 self.assertIsInstance(engine, se.SearchEngine) 43 self.assertIs(root._searchengine, engine) 44 self.assertIs(se.get(root), engine) 50 def test_get_line_col(self): 51 self.assertEqual(se.get_line_col('1.0'), (1, 0)) 52 self.assertEqual(se.get_line_col('1.11'), (1, 11)) 54 self.assertRaises(ValueError, se.get_line_col, ('1.0 lineend')) 55 self [all...] |
/third_party/python/Modules/_decimal/tests/ |
H A D | deccheck.py | 191 def __init__(self, c_ctx=None, p_ctx=None): 193 self.c = C.getcontext() if c_ctx is None else c_ctx 194 self.p = P.getcontext() if p_ctx is None else p_ctx 195 self.p.prec = self.c.prec 196 self.p.Emin = self.c.Emin 197 self.p.Emax = self.c.Emax 198 self [all...] |
/kernel/linux/linux-6.6/tools/perf/scripts/python/ |
H A D | task-analyzer.py | 241 def __init__(self): 242 self._last_start = None 243 self._last_finish = None 244 self.out_out = -1 245 self.in_out = -1 246 self.out_in = -1 247 self.in_in = -1 249 self._time_in = -1 250 self.max_out_in = -1 251 self [all...] |
/foundation/arkui/ace_engine/test/tools/event_tree_to_graph/src/beans/ |
H A D | event_scope.py | 34 def __init__(self, input_str): 36 self.event_nodes = [] 39 self.parse_failed() 42 self.finger = get_value_as_int(finger_str, get_sample_key(event_procedure_keyword, 'finger'), 44 self.parse_event_nodes(texts, 1) 45 self.check_parse_result() 66 def parse_event_nodes(self, spliced_lines, start_index): 85 self.event_nodes.append(event_node) 89 def check_parse_result(self): 90 if self [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/tc-testing/plugin-lib/ |
H A D | buildebpfPlugin.py | 14 def __init__(self): 15 self.sub_class = 'buildebpf/SubPlugin' 16 self.tap = '' 19 def pre_suite(self, testcount, testidlist): 22 if self.args.buildebpf: 23 self._ebpf_makeall() 25 def post_suite(self, index): 28 self._ebpf_makeclean() 30 def add_args(self, parser): 33 self [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/aquantia/atlantic/hw_atl/ |
H A D | hw_atl_b0.h | 35 int hw_atl_b0_hw_rss_hash_set(struct aq_hw_s *self, 37 int hw_atl_b0_hw_offload_set(struct aq_hw_s *self, 40 int hw_atl_b0_hw_ring_tx_start(struct aq_hw_s *self, struct aq_ring_s *ring); 41 int hw_atl_b0_hw_ring_rx_start(struct aq_hw_s *self, struct aq_ring_s *ring); 43 int hw_atl_b0_hw_ring_rx_init(struct aq_hw_s *self, struct aq_ring_s *aq_ring, 45 int hw_atl_b0_hw_ring_rx_fill(struct aq_hw_s *self, struct aq_ring_s *ring, 47 int hw_atl_b0_hw_ring_rx_receive(struct aq_hw_s *self, struct aq_ring_s *ring); 49 int hw_atl_b0_hw_ring_tx_init(struct aq_hw_s *self, struct aq_ring_s *aq_ring, 51 int hw_atl_b0_hw_ring_tx_xmit(struct aq_hw_s *self, struct aq_ring_s *ring, 53 int hw_atl_b0_hw_ring_tx_head_update(struct aq_hw_s *self, [all...] |
/kernel/linux/linux-5.10/tools/testing/kunit/ |
H A D | kunit_config.py | 19 def __str__(self) -> str: 20 if self.value == 'n': 21 return r'# CONFIG_%s is not set' % (self.name) 23 return r'CONFIG_%s=%s' % (self.name, self.value) 33 def __init__(self): 34 self._entries = [] 36 def entries(self): 37 return set(self._entries) 39 def add_entry(self, entr [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/aquantia/atlantic/hw_atl/ |
H A D | hw_atl_b0.h | 35 int hw_atl_b0_hw_rss_hash_set(struct aq_hw_s *self, 37 int hw_atl_b0_hw_offload_set(struct aq_hw_s *self, 40 int hw_atl_b0_hw_ring_tx_start(struct aq_hw_s *self, struct aq_ring_s *ring); 41 int hw_atl_b0_hw_ring_rx_start(struct aq_hw_s *self, struct aq_ring_s *ring); 43 int hw_atl_b0_hw_ring_rx_init(struct aq_hw_s *self, struct aq_ring_s *aq_ring, 45 int hw_atl_b0_hw_ring_rx_fill(struct aq_hw_s *self, struct aq_ring_s *ring, 47 int hw_atl_b0_hw_ring_rx_receive(struct aq_hw_s *self, struct aq_ring_s *ring); 49 int hw_atl_b0_hw_ring_tx_init(struct aq_hw_s *self, struct aq_ring_s *aq_ring, 51 int hw_atl_b0_hw_ring_tx_xmit(struct aq_hw_s *self, struct aq_ring_s *ring, 53 int hw_atl_b0_hw_ring_tx_head_update(struct aq_hw_s *self, [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/tc-testing/plugin-lib/ |
H A D | buildebpfPlugin.py | 14 def __init__(self): 15 self.sub_class = 'buildebpf/SubPlugin' 16 self.tap = '' 19 def pre_suite(self, testcount, testidlist): 22 if self.args.buildebpf: 23 self._ebpf_makeall() 25 def post_suite(self, index): 28 self._ebpf_makeclean() 30 def add_args(self, parser): 33 self [all...] |
/test/testfwk/developer_test/src/core/config/ |
H A D | parse_parts_config.py | 31 def __init__(self, productform): 32 self.productform = productform 33 self.subsystem_infos, self.part_infos = self.get_infos_data() 36 def get_config_file_path(self): 46 get_build_output_path(self.productform), 59 def get_infos_data(self): 60 config_filepath = self.get_config_file_path() 74 if is_open_source_product(self [all...] |
/third_party/curl/tests/ |
H A D | util.py | 40 def __init__(self, filename): 41 super(ClosingFileHandler, self).__init__() 42 self.filename = os.path.abspath(filename) 43 self.setStream(None) 45 def emit(self, record): 46 with open(self.filename, "a") as fp: 47 self.setStream(fp) 48 super(ClosingFileHandler, self).emit(record) 49 self.setStream(None) 51 def setStream(self, strea [all...] |
/third_party/gn/infra/recipe_modules/windows_sdk/ |
H A D | api.py | 13 def __init__(self, sdk_properties, *args, **kwargs): 14 super(WindowsSDKApi, self).__init__(*args, **kwargs) 16 self._sdk_package = sdk_properties['sdk_package'] 17 self._sdk_version = sdk_properties['sdk_version'] 20 def __call__(self): 28 if not self.m.platform.is_win: 32 with self.m.context(infra_steps=True): 33 sdk_dir = self._ensure_sdk() 35 with self.m.context(**self [all...] |
/third_party/skia/third_party/externals/brotli/python/tests/ |
H A D | decompressor_test.py | 21 def setUp(self): 22 self.decompressor = brotli.Decompressor() 24 def tearDown(self): 25 self.decompressor = None 27 def _check_decompression(self, test_data): 31 self.assertFilesMatch(temp_uncompressed, original) 33 def _decompress(self, test_data): 37 read_chunk = functools.partial(in_file.read, self.CHUNK_SIZE) 39 out_file.write(self.decompressor.process(data)) 40 self [all...] |
/third_party/skia/tools/skpbench/ |
H A D | _benchresult.py | 42 def __init__(self, match): 43 self.accum = float(match.group('accum')) 44 self.median = float(match.group('median')) 45 self.max = float(match.group('max')) 46 self.min = float(match.group('min')) 47 self.stddev = float(match.group('stddev')[:-1]) # Drop '%' sign. 48 self.samples = int(match.group('samples')) 49 self.sample_ms = int(match.group('sample_ms')) 50 self.clock = match.group('clock') 51 self [all...] |
/third_party/python/Lib/tkinter/test/test_tkinter/ |
H A D | test_colorchooser.py | 19 def test_fixoptions(self): 20 cc = self.cc 22 self.assertEqual(cc.options['initialcolor'], 'dark blue slate') 26 self.assertEqual(cc.options['initialcolor'], '#D2D269691E1E') 30 self.assertEqual(cc.options['initialcolor'], '#d2691e') 32 def test_fixresult(self): 33 cc = self.cc 34 self.assertEqual(cc._fixresult(self.root, ()), (None, None)) 35 self [all...] |
/third_party/python/Lib/test/test_asyncio/ |
H A D | test_buffered_proto.py | 12 def __init__(self, cb, con_lost_fut): 13 self.cb = cb 14 self.con_lost_fut = con_lost_fut 16 def get_buffer(self, sizehint): 17 self.buffer = bytearray(100) 18 return self.buffer 20 def buffer_updated(self, nbytes): 21 self.cb(self.buffer[:nbytes]) 23 def connection_lost(self, ex [all...] |
/third_party/python/Lib/test/ |
H A D | test_colorsys.py | 11 def assertTripleEqual(self, tr1, tr2): 12 self.assertEqual(len(tr1), 3) 13 self.assertEqual(len(tr2), 3) 14 self.assertAlmostEqual(tr1[0], tr2[0]) 15 self.assertAlmostEqual(tr1[1], tr2[1]) 16 self.assertAlmostEqual(tr1[2], tr2[2]) 18 def test_hsv_roundtrip(self): 23 self.assertTripleEqual( 28 def test_hsv_values(self): 42 self [all...] |
/third_party/python/Lib/test/test_importlib/ |
H A D | test_read.py | 9 def execute(self, package, path): 14 def execute(self, package, path): 19 def test_read_bytes(self): 20 result = resources.files(self.data).joinpath('binary.file').read_bytes() 21 self.assertEqual(result, b'\0\1\2\3') 23 def test_read_text_default_encoding(self): 24 result = resources.files(self.data).joinpath('utf-8.file').read_text() 25 self.assertEqual(result, 'Hello, UTF-8 world!\n') 27 def test_read_text_given_encoding(self): 29 resources.files(self [all...] |
/third_party/python/Lib/test/test_json/ |
H A D | test_indent.py | 7 def test_indent(self): 32 d1 = self.dumps(h) 33 d2 = self.dumps(h, indent=2, sort_keys=True, separators=(',', ': ')) 34 d3 = self.dumps(h, indent='\t', sort_keys=True, separators=(',', ': ')) 35 d4 = self.dumps(h, indent=2, sort_keys=True) 36 d5 = self.dumps(h, indent='\t', sort_keys=True) 38 h1 = self.loads(d1) 39 h2 = self.loads(d2) 40 h3 = self.loads(d3) 42 self [all...] |
/foundation/systemabilitymgr/samgr/test/autotest/testcases/level0/ |
H A D | case05_init001.py | 24 def __init__(self, configs):
25 self.TAG = self.__class__.__name__
26 TestCase.__init__(self, self.TAG, configs)
27 self.tests = [
30 self.driver = UiDriver(self.device1)
31 self.sn = self [all...] |
/kernel/linux/linux-6.6/tools/testing/kunit/ |
H A D | kunit_printer.py | 18 def __init__(self, output: typing.IO[str]): 19 self._output = output 20 self._use_color = output.isatty() 22 def print(self, message: str) -> None: 23 print(message, file=self._output) 25 def print_with_timestamp(self, message: str) -> None: 27 self.print(f'[{ts}] {message}') 29 def _color(self, code: str, text: str) -> str: 30 if not self._use_color: 34 def red(self, tex [all...] |
/third_party/jerryscript/jerry-debugger/ |
H A D | jerry_client_tcp.py | 23 def __init__(self, address, socket_family=socket.AF_INET, socket_type=socket.SOCK_STREAM, proto=0, fileno=None): 24 self.address = address 25 self.socket = socket.socket(socket_family, socket_type, proto, fileno) 27 def connect(self): 32 print("Connecting to: %s:%s" % (self.address[0], self.address[1])) 33 self.socket.connect(self.address) 35 def close(self): 37 self [all...] |
/third_party/ltp/metadata/ |
H A D | data_storage.h | 137 static inline int data_node_hash_add(struct data_node *self, const char *id, struct data_node *payload) in data_node_hash_add() argument 139 if (self->type != DATA_HASH) in data_node_hash_add() 142 struct data_node_hash *hash = &self->hash; in data_node_hash_add() 155 static inline void data_node_free(struct data_node *self) in data_node_free() argument 159 switch (self->type) { in data_node_free() 164 for (i = 0; i < self->hash.elems_used; i++) { in data_node_free() 165 data_node_free(self->hash.elems[i].node); in data_node_free() 166 free(self->hash.elems[i].id); in data_node_free() 170 for (i = 0; i < self->array.array_used; i++) in data_node_free() 171 data_node_free(self in data_node_free() 178 data_node_hash_del(struct data_node *self, const char *id) data_node_hash_del() argument 199 data_node_hash_get(struct data_node *self, const char *id) data_node_hash_get() argument 215 data_node_array_add(struct data_node *self, struct data_node *payload) data_node_array_add() argument 230 data_node_array_len(struct data_node *self) data_node_array_len() argument 244 data_node_print_(struct data_node *self, unsigned int padd) data_node_print_() argument 278 data_node_print(struct data_node *self) data_node_print() argument 334 data_to_json_(struct data_node *self, FILE *f, unsigned int padd, int do_padd) data_to_json_() argument 371 data_to_json(struct data_node *self, FILE *f, unsigned int padd) data_to_json() argument [all...] |
/third_party/node/tools/gyp/ |
H A D | test_gyp.py | 169 def __init__(self, formats, tests, gyp_options, verbose): 170 self.formats = formats 171 self.tests = tests 172 self.verbose = verbose 173 self.gyp_options = gyp_options 174 self.failures = [] 175 self.num_tests = len(formats) * len(tests) 176 num_digits = len(str(self.num_tests)) 177 self.fmt_str = "[%%%dd/%%%dd] (%%s) %%s" % (num_digits, num_digits) 178 self [all...] |
/third_party/musl/porting/liteos_a/user/src/thread/ |
H A D | pthread_create.c | 55 pthread_t self = __pthread_self(); in __pthread_exit() local 58 self->canceldisable = 1; in __pthread_exit() 59 self->cancelasync = 0; in __pthread_exit() 60 self->result = result; in __pthread_exit() 62 while (self->cancelbuf) { in __pthread_exit() 63 void (*f)(void *) = self->cancelbuf->__f; in __pthread_exit() 64 void *x = self->cancelbuf->__x; in __pthread_exit() 65 self->cancelbuf = self->cancelbuf->__next; in __pthread_exit() 78 LOCK(self in __pthread_exit() 168 struct pthread *self = __pthread_self(); __do_cleanup_push() local 238 struct pthread *self, *new; __pthread_create() local [all...] |