/foundation/ability/idl_tool/test/hdi_unittest/hdi_hash_test/ |
H A D | hash_bad_04.py | 22 def gen_fail_output(self): 23 work_dir = self.get_working_dir() 25 if not os.path.exists(self.target_dir): 26 os.makedirs(self.target_dir) 28 fail_output = os.path.join(self.target_dir, "fail_output.txt") 32 def set_idl_attr(self): 33 work_dir = self.get_working_dir() 36 self.set_hash_param(package_path, idl_dir) 38 def run(self): 39 self [all...] |
/third_party/googletest/googlemock/test/ |
H A D | gmock_leak_test.py | 54 def testCatchesLeakedMockByDefault(self): 55 self.assertNotEqual( 59 self.assertNotEqual( 64 def testDoesNotCatchLeakedMockWhenDisabled(self): 65 self.assertEquals( 70 self.assertEquals( 76 def testCatchesLeakedMockWhenEnabled(self): 77 self.assertNotEqual( 82 self.assertNotEqual( 88 def testCatchesLeakedMockWhenEnabledWithExplictFlagValue(self) [all...] |
/third_party/python/Lib/importlib/metadata/ |
H A D | _adapters.py | 35 def __init__(self, *args, **kwargs): 36 self._headers = self._repair_headers() 39 def __iter__(self): 42 def _repair_headers(self): 49 headers = [(key, redent(value)) for key, value in vars(self)['_headers']] 50 if self._payload: 51 headers.append(('Description', self.get_payload())) 55 def json(self): 62 value = self [all...] |
/third_party/python/Lib/distutils/tests/ |
H A D | test_extension.py | 12 def test_read_setup_file(self): 32 self.assertEqual(names, wanted) 34 def test_extension_init(self): 36 self.assertRaises(AssertionError, Extension, 1, []) 38 self.assertEqual(ext.name, 'name') 42 self.assertRaises(AssertionError, Extension, 'name', 'file') 43 self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) 45 self.assertEqual(ext.sources, ['file1', 'file2']) 52 self.assertEqual(getattr(ext, attr), []) 54 self [all...] |
/third_party/python/Lib/test/test_json/ |
H A D | test_encode_basestring_ascii.py | 21 def test_encode_basestring_ascii(self): 22 fname = self.json.encoder.encode_basestring_ascii.__name__ 24 result = self.json.encoder.encode_basestring_ascii(input_string) 25 self.assertEqual(result, expect, 29 def test_ordered_dict(self): 32 s = self.dumps(OrderedDict(items)) 33 self.assertEqual(s, '{"one": 1, "two": 2, "three": 3, "four": 4, "five": 5}') 35 def test_sorted_dict(self): 37 s = self.dumps(dict(items), sort_keys=True) 38 self [all...] |
/third_party/node/tools/gyp/pylib/gyp/ |
H A D | mac_tool.py | 37 def Dispatch(self, args): 42 method = "Exec%s" % self._CommandifyName(args[0]) 43 return getattr(self, method)(*args[1:]) 45 def _CommandifyName(self, name_string): 49 def ExecCopyBundleResource(self, source, dest, convert_to_binary): 63 return self._CopyXIBFile(source, dest) 65 return self._CopyXIBFile(source, dest) 67 self._CopyStringsFile(source, dest) 74 self._ConvertToBinary(dest) 76 def _CopyXIBFile(self, sourc [all...] |
/third_party/node/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ |
H A D | mac_tool.py | 37 def Dispatch(self, args): 42 method = "Exec%s" % self._CommandifyName(args[0]) 43 return getattr(self, method)(*args[1:]) 45 def _CommandifyName(self, name_string): 49 def ExecCopyBundleResource(self, source, dest, convert_to_binary): 63 return self._CopyXIBFile(source, dest) 65 return self._CopyXIBFile(source, dest) 67 self._CopyStringsFile(source, dest) 74 self._ConvertToBinary(dest) 76 def _CopyXIBFile(self, sourc [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 1045 memset(&self->prog, 0, sizeof(self->prog)); in FIXTURE_SETUP() 1046 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP() 1047 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP() 1048 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP() 1049 self->prog.len = (unsigned short)ARRAY_SIZE(filter); in FIXTURE_SETUP() 1054 if (self->prog.filter) in FIXTURE_TEARDOWN() 1055 free(self->prog.filter); in FIXTURE_TEARDOWN() 1065 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F_SIGNAL() 1080 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self in TEST_F_SIGNAL() 3765 pid_t self; TEST() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/rtc/ |
H A D | rtctest.c | 31 self->fd = open(rtc_file, O_RDONLY); in FIXTURE_SETUP() 32 ASSERT_NE(-1, self->fd); in FIXTURE_SETUP() 36 close(self->fd); in FIXTURE_TEARDOWN() 44 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F() 57 rc = ioctl(self->fd, RTC_UIE_ON, 0); 66 rc = read(self->fd, &data, sizeof(data)); 73 rc = ioctl(self->fd, RTC_UIE_OFF, 0); 82 rc = ioctl(self->fd, RTC_UIE_ON, 0); in TEST_F() 94 FD_SET(self->fd, &readfds); in TEST_F() 96 rc = select(self in TEST_F() [all...] |
/third_party/jinja2/ |
H A D | ext.py | 26 def gettext(self, message: str) -> str: 29 def ngettext(self, singular: str, plural: str, n: int) -> str: 33 def pgettext(self, context: str, message: str) -> str: 36 def npgettext(self, context: str, singular: str, plural: str, n: int) -> str: 57 but may not store environment specific data on `self`. The reason for 88 def __init__(self, environment: Environment) -> None: 89 self.environment = environment 91 def bind(self, environment: Environment) -> "Extension": 93 rv = object.__new__(self.__class__) 94 rv.__dict__.update(self [all...] |
/third_party/python/Modules/clinic/ |
H A D | _asynciomodule.c.h | 23 _asyncio_Future___init___impl(FutureObj *self, PyObject *loop); 26 _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) in _asyncio_Future___init__() argument 46 return_value = _asyncio_Future___init___impl((FutureObj *)self, loop); in _asyncio_Future___init__() 53 "result($self, /)\n" 66 _asyncio_Future_result_impl(FutureObj *self); 69 _asyncio_Future_result(FutureObj *self, PyObject *Py_UNUSED(ignored)) in _asyncio_Future_result() argument 71 return _asyncio_Future_result_impl(self); in _asyncio_Future_result() 75 "exception($self, /)\n" 89 _asyncio_Future_exception_impl(FutureObj *self); 92 _asyncio_Future_exception(FutureObj *self, PyObjec argument 139 _asyncio_Future_add_done_callback(FutureObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) _asyncio_Future_add_done_callback() argument 193 _asyncio_Future_cancel(FutureObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) _asyncio_Future_cancel() argument 230 _asyncio_Future_cancelled(FutureObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Future_cancelled() argument 251 _asyncio_Future_done(FutureObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Future_done() argument 269 _asyncio_Future_get_loop(FutureObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Future_get_loop() argument 290 _asyncio_Future__make_cancelled_error(FutureObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Future__make_cancelled_error() argument 306 _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) _asyncio_Task___init__() argument 364 _asyncio_Task__make_cancelled_error(TaskObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Task__make_cancelled_error() argument 401 _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) _asyncio_Task_cancel() argument 441 _asyncio_Task_cancelling(TaskObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Task_cancelling() argument 464 _asyncio_Task_uncancel(TaskObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Task_uncancel() argument 500 _asyncio_Task_get_stack(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) _asyncio_Task_get_stack() argument 544 _asyncio_Task_print_stack(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) _asyncio_Task_print_stack() argument 603 _asyncio_Task_get_coro(TaskObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Task_get_coro() argument 620 _asyncio_Task_get_name(TaskObj *self, PyObject *Py_UNUSED(ignored)) _asyncio_Task_get_name() argument [all...] |
/third_party/mesa3d/src/freedreno/common/ |
H A D | freedreno_devices.py | 30 def __init__(self): 35 self.gpu_infos = [] 38 self.gpus = {} 40 def info_index(self, gpu_info): 42 for info in self.gpu_infos: 55 def __init__(self, gpu_id = None, chip_id = None, name=None): 65 self.chip_id = chip_id 68 self.gpu_id = gpu_id 72 self.name = name 77 def __str__(self) [all...] |
/third_party/python/Lib/test/ |
H A D | test_c_locale_coercion.py | 209 def _check_child_encoding_details(self, 230 self.assertEqual(encoding_details, expected_details) 233 self.assertEqual(stderr_lines, expected_warnings) 246 def test_external_target_locale_configuration(self): 250 self.maxDiff = None 269 with self.subTest(env_var=env_var, 273 self._check_child_encoding_details(var_dict, 287 def _check_c_locale_coercion(self, 304 self.maxDiff = None 325 with self [all...] |
/third_party/python/Lib/ |
H A D | mimetypes.py | 72 def __init__(self, filenames=(), strict=True): 75 self.encodings_map = _encodings_map_default.copy() 76 self.suffix_map = _suffix_map_default.copy() 77 self.types_map = ({}, {}) # dict for (non-strict, strict) 78 self.types_map_inv = ({}, {}) 80 self.add_type(type, ext, True) 82 self.add_type(type, ext, False) 84 self.read(name, strict) 86 def add_type(self, type, ext, strict=True): 98 self [all...] |
/third_party/skia/tools/skqp/ |
H A D | create_apk.py | 81 def __init__(self, *args): 82 self.args = args 83 def __enter__(self): 85 def __exit__(self, a, b, c): 86 for arg in self.args: 90 def __init__(self, d): 91 self.orig = os.getcwd() 93 def __enter__(self): 95 def __exit__(self, a, b, c): 96 os.chdir(self [all...] |
/third_party/node/deps/openssl/openssl/util/perl/OpenSSL/ |
H A D | Ordinals.pm | 118 my $self = shift; 154 $self->{contents} = [ @tmp_contents ]; 155 $self->{name2num} = { %tmp_name2num }; 156 $self->{maxassigned} = $max_assigned; 157 $self->{maxnum} = $max_num; 158 $self->{filename} = $filename; 163 $self->{loaded_contents}->[$i] = 168 $self->{loaded_maxnum} = $max_num; 179 my $self = shift; 182 foreach ($self [all...] |
/third_party/openssl/util/perl/OpenSSL/ |
H A D | Ordinals.pm | 118 my $self = shift; 154 $self->{contents} = [ @tmp_contents ]; 155 $self->{name2num} = { %tmp_name2num }; 156 $self->{maxassigned} = $max_assigned; 157 $self->{maxnum} = $max_num; 158 $self->{filename} = $filename; 163 $self->{loaded_contents}->[$i] = 168 $self->{loaded_maxnum} = $max_num; 179 my $self = shift; 182 foreach ($self [all...] |
/third_party/protobuf/python/google/protobuf/ |
H A D | json_format.py | 188 self, 194 self.including_default_value_fields = including_default_value_fields 195 self.preserving_proto_field_name = preserving_proto_field_name 196 self.use_integers_for_enums = use_integers_for_enums 197 self.descriptor_pool = descriptor_pool 199 self.float_format = '.{}g'.format(float_precision) 201 self.float_format = None 203 def ToJsonString(self, message, indent, sort_keys): 204 js = self._MessageToJsonObject(message) 207 def _MessageToJsonObject(self, messag [all...] |
/foundation/ability/idl_tool/test/hdi_unittest/hdi_gen_test/ |
H A D | hdi_compile_opt_test_03.py | 24 def get_file_name(self): 27 def set_idl_attr(self): 28 work_dir = self.get_working_dir() 31 self.set_not_use_default_add_idl_file(True) 32 self.set_system_attr("full") 33 self.set_mode_attr("ipc") 34 self.set_gen_cpp_env() 35 command = f"{self._idl} --intf-type hdi {self._gen_langauge} -c -c "\ 36 f"--system {self [all...] |
H A D | hdi_compile_opt_test_02.py | 24 def get_file_name(self): 27 def set_idl_attr(self): 28 work_dir = self.get_working_dir() 31 self.set_not_use_default_add_idl_file(True) 32 self.set_system_attr("full") 33 self.set_mode_attr("ipc") 34 self.set_gen_cpp_env() 35 command = f"{self._idl} --intf-type hdi {self._gen_langauge} -c "\ 36 f"--system {self [all...] |
H A D | hdi_compile_opt_test_01.py | 24 def get_file_name(self): 27 def set_idl_attr(self): 28 work_dir = self.get_working_dir() 31 self.set_not_use_default_add_idl_file(True) 32 self.set_system_attr("full") 33 self.set_mode_attr("ipc") 34 self.set_gen_cpp_env() 35 command = f"{self._idl} --intf-type hdi {self._gen_langauge} -c "\ 36 f"--system {self [all...] |
/test/xts/acts/pcs/pcs_py/ |
H A D | testInstallSignedHap.py | 25 def __init__(self, controllers): 26 self.TAG = self.__class__.__name__ 27 super().__init__(self.TAG, controllers) 29 def setup(self): 32 def process(self): 35 installHapResult = self.device1.execute_shell_command("bm install -p /data/local/tmp/signed.hap") 38 installHspResult = self.device1.execute_shell_command("bm install -p /data/local/tmp/signed.hsp") 41 installHqfResult = self.device1.execute_shell_command("bm quickfix -a -f /data/local/tmp/signed.hqf") 45 self [all...] |
H A D | testAppSignatureVerify.py | 25 def __init__(self, controllers): 26 self.TAG = self.__class__.__name__ 27 super().__init__(self.TAG, controllers) 29 def setup(self): 32 def process(self): 34 installHapResult = self.device1.execute_shell_command("bm install -p /data/local/tmp/unsigned.hap") 36 bundleNames = self.device1.execute_shell_command("bm dump -a").strip() 38 installHapResult = self.device1.execute_shell_command("bm install -p /data/local/tmp/signed.hap") 40 bundleNames = self [all...] |
H A D | testRealRandomGenerate.py | 25 def __init__(self, controllers): 26 self.TAG = self.__class__.__name__ 27 super().__init__(self.TAG, controllers) 29 def setup(self): 32 def process(self): 34 randomFile = self.device1.execute_shell_command("ls /dev/random | wc -l").strip() 36 urandomFile = self.device1.execute_shell_command("ls /dev/urandom | wc -l").strip() 40 randomNumber = self.device1.execute_shell_command("cat /dev/random | head -n 10 | md5sum | head -c 10", timeout = 1000).strip() 44 randomNumber = self [all...] |
/third_party/node/deps/v8/tools/testrunner/objects/ |
H A D | predictable.py | 27 def __init__(self, _outproc): 28 super(OutProc, self).__init__() 29 self._outproc = _outproc 31 def has_unexpected_output(self, output): 34 def get_outcome(self, output): 35 return self._outproc.get_outcome(output) 38 def negative(self): 39 return self._outproc.negative 42 def expected_outcomes(self): 43 return self [all...] |