Home
last modified time | relevance | path

Searched refs:self (Results 1676 - 1700 of 4778) sorted by relevance

1...<<61626364656667686970>>...192

/third_party/python/Lib/ctypes/test/
H A Dtest_python_api.py16 def test_PyBytes_FromStringAndSize(self):
22 self.assertEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc")
25 def test_PyString_FromString(self):
32 self.assertEqual(grc(s), refcnt)
33 self.assertEqual(s, pyob)
35 self.assertEqual(grc(s), refcnt)
38 def test_PyLong_Long(self):
41 self.assertEqual(pythonapi.PyLong_FromLong(42), 42)
43 self.assertEqual(grc(42), ref42)
49 self
[all...]
H A Dtest_returnfuncptrs.py8 def test_with_prototype(self):
15 self.assertEqual(strchr(b"abcdef", b"b"), b"bcdef")
16 self.assertEqual(strchr(b"abcdef", b"x"), None)
17 self.assertEqual(strchr(b"abcdef", 98), b"bcdef")
18 self.assertEqual(strchr(b"abcdef", 107), None)
19 self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0)
20 self.assertRaises(TypeError, strchr, b"abcdef")
22 def test_without_prototype(self):
31 self.assertTrue(strchr(b"abcdef", b"b"), "bcdef")
32 self
[all...]
H A Dtest_funcptr.py14 def test_basic(self):
21 self.assertEqual(x.restype, c_int)
22 self.assertEqual(x.argtypes, (c_int, c_int))
23 self.assertEqual(sizeof(x), sizeof(c_voidp))
24 self.assertEqual(sizeof(X), sizeof(c_voidp))
26 def test_first(self):
36 self.assertEqual(s(1, 2), 3)
37 self.assertEqual(c(1, 2), 3)
40 #self.assertRaises(TypeError, c, 1, 2, 3)
41 self
[all...]
H A Dtest_varsize_struct.py5 def test_resize(self):
10 self.assertEqual(sizeof(X), sizeof(c_int) * 2)
14 self.assertEqual(sizeof(x), sizeof(c_int) * 2)
19 self.assertEqual(sizeof(x), new_size)
20 self.assertEqual((x.item, x.array[0]), (42, 100))
25 self.assertEqual(sizeof(x), new_size)
26 self.assertEqual((x.item, x.array[0]), (42, 100))
31 self.assertEqual(sizeof(x), new_size)
32 self.assertEqual((x.item, x.array[0]), (42, 100))
34 def test_array_invalid_length(self)
[all...]
/third_party/protobuf/python/google/protobuf/
H A Ddescriptor_database.py49 def __init__(self):
50 self._file_desc_protos_by_file = {}
51 self._file_desc_protos_by_symbol = {}
53 def Add(self, file_desc_proto):
64 if proto_name not in self._file_desc_protos_by_file:
65 self._file_desc_protos_by_file[proto_name] = file_desc_proto
66 elif self._file_desc_protos_by_file[proto_name] != file_desc_proto:
76 self._AddSymbol(name, file_desc_proto)
78 self._AddSymbol(('.'.join((package, enum.name))), file_desc_proto)
80 self
[all...]
/third_party/python/Lib/distutils/tests/
H A Dtest_dep_util.py12 def test_newer(self):
14 tmpdir = self.mkdtemp()
19 self.assertRaises(DistutilsFileError, newer, new_file, old_file)
23 self.write_file(new_file)
24 self.assertTrue(newer(new_file, 'I_dont_exist'))
25 self.assertTrue(newer(new_file, old_file))
29 self.assertFalse(newer(old_file, new_file))
31 def test_newer_pairwise(self):
32 tmpdir = self.mkdtemp()
41 self
[all...]
/third_party/python/Lib/test/test_importlib/import_/
H A Dtest_caching.py25 def test_using_cache(self):
30 module = self.__import__('some_module')
31 self.assertEqual(id(module_to_use), id(module))
33 def test_None_in_cache(self):
38 with self.assertRaises(ImportError) as cm:
39 self.__import__(name)
40 self.assertEqual(cm.exception.name, name)
54 def create_mock(self, *names, return_=None):
57 def load_module(self, fullname):
65 def test_using_cache_after_loader(self)
[all...]
/third_party/python/Lib/test/
H A Dtest_smtpnet.py28 def test_connect_starttls(self):
33 with socket_helper.transient_internet(self.testServer):
34 server = smtplib.SMTP(self.testServer, self.remotePort)
50 def test_connect(self):
52 with socket_helper.transient_internet(self.testServer):
53 server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
57 def test_connect_default_port(self):
59 with socket_helper.transient_internet(self
[all...]
H A Dtest_poll.py33 def test_poll1(self):
73 self.assertEqual(len(buf), MSG_LEN)
80 self.assertEqual(bufs, [MSG] * NUM_PIPES)
82 def test_poll_unit_tests(self):
90 self.assertEqual(r[0], (FD, select.POLLNVAL))
97 self.assertEqual(r[0][0], fd)
99 self.assertEqual(r[0], (fd, select.POLLNVAL))
104 self.assertRaises(TypeError, p.register, p)
105 self.assertRaises(TypeError, p.unregister, p)
109 self
[all...]
/third_party/python/Lib/
H A Denum.py27 def __init__(self, value):
28 self.value = value
34 def __init__(self, value):
35 self.value = value
107 def _break_on_call_reduce(self, proto):
108 raise TypeError('%r cannot be pickled' % self)
169 def __repr__(self):
177 def __init__(self, value=_auto_null):
178 self.value = value
180 def __repr__(self)
[all...]
H A DcProfile.py41 def print_stats(self, sort=-1):
43 pstats.Stats(self).strip_dirs().sort_stats(sort).print_stats()
45 def dump_stats(self, file):
48 self.create_stats()
49 marshal.dump(self.stats, f)
51 def create_stats(self):
52 self.disable()
53 self.snapshot_stats()
55 def snapshot_stats(self):
56 entries = self
[all...]
H A Dtabnanny.py64 def __init__(self, lineno, msg, line):
65 self.lineno, self.msg, self.line = lineno, msg, line
66 def get_lineno(self):
67 return self.lineno
68 def get_msg(self):
69 return self.msg
70 def get_line(self):
71 return self
[all...]
/third_party/PyYAML/examples/yaml-highlight/
H A Dyaml_hl.py7 def __init__(self, header=None, footer=None,
9 self.header = header
10 self.footer = footer
11 self.replaces = replaces
12 self.substitutions = {}
25 self.substitutions[cls, -1] = start
27 self.substitutions[cls, +1] = end
29 def __setstate__(self, state):
30 self.__init__(**state)
39 def __init__(self, option
[all...]
/third_party/python/Lib/test/test_email/
H A D__init__.py33 def __init__(self, *args, **kw):
35 self.addTypeEqualityFunc(bytes, self.assertBytesEqual)
40 def _msgobj(self, filename):
42 return email.message_from_file(fp, policy=self.policy)
44 def _str_msg(self, string, message=None, policy=None):
46 policy = self.policy
48 message = self.message
51 def _bytes_msg(self, bytestring, message=None, policy=None):
53 policy = self
[all...]
/third_party/python/Lib/idlelib/
H A Ddebugobj_r.py12 def __init__(self, item):
13 self.__item = item
15 def __getattr__(self, name):
16 value = getattr(self.__item, name)
19 def _GetSubList(self):
20 sub_list = self.__item._GetSubList()
26 def __init__(self, sockio, oid):
27 self.sockio = sockio
28 self.oid = oid
30 def __getattr__(self, nam
[all...]
/third_party/python/Lib/test/test_importlib/source/
H A Dtest_path_hook.py12 def path_hook(self):
13 return self.machinery.FileFinder.path_hook((self.machinery.SourceFileLoader,
14 self.machinery.SOURCE_SUFFIXES))
16 def test_success(self):
18 self.assertTrue(hasattr(self.path_hook()(mapping['.root']),
21 def test_success_legacy(self):
23 self.assertTrue(hasattr(self
[all...]
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/
H A Dreflow.py74 def __init__(self,
84 self.filename = filename
87 self.check = check
90 self.margin = margin
93 self.breakPeriod = breakPeriod
97 self.breakInitial = True
101 self.reflow = reflow
104 self.vuPrefix = 'VUID'
107 self.vuFormat = '{0}-{1}-{2}-{3:0>5d}'
112 self
[all...]
/third_party/googletest/googletest/test/
H A Dgoogletest-break-on-failure-unittest.py95 def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
138 self.assert_(has_seg_fault == expect_seg_fault, msg)
140 def testDefaultBehavior(self):
143 self.RunAndVerify(env_var_value=None,
147 def testEnvVar(self):
150 self.RunAndVerify(env_var_value='0',
153 self.RunAndVerify(env_var_value='1',
157 def testFlag(self):
160 self.RunAndVerify(env_var_value=None,
163 self
[all...]
/third_party/vk-gl-cts/external/openglcts/scripts/
H A Dverify_kc_cts_rev.py42 def __init__(self, baseDir, extractDir):
43 self.baseDir = baseDir
44 self.extractDir = extractDir
46 def clean (self):
47 fullDstPath = os.path.join(EXTERNAL_DIR, self.baseDir, self.extractDir)
52 def __init__(self, url, revision, baseDir, extractDir = "src"):
53 Source.__init__(self, baseDir, extractDir)
54 self.url = url
55 self
[all...]
/third_party/python/Modules/
H A D_zoneinfo.c112 load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj);
161 find_ttinfo(PyZoneInfo_ZoneInfo *self, PyObject *dt);
199 PyObject *self = (PyObject *)(type->tp_alloc(type, 0)); in zoneinfo_new_instance() local
200 if (self == NULL) { in zoneinfo_new_instance()
211 if (load_data((PyZoneInfo_ZoneInfo *)self, file_obj)) { in zoneinfo_new_instance()
223 ((PyZoneInfo_ZoneInfo *)self)->key = key; in zoneinfo_new_instance()
228 Py_XDECREF(self); in zoneinfo_new_instance()
229 self = NULL; in zoneinfo_new_instance()
237 Py_CLEAR(self); in zoneinfo_new_instance()
243 return self; in zoneinfo_new_instance()
306 PyZoneInfo_ZoneInfo *self = (PyZoneInfo_ZoneInfo *)obj_self; zoneinfo_dealloc() local
347 PyZoneInfo_ZoneInfo *self = NULL; zoneinfo_from_file() local
463 zoneinfo_utcoffset(PyObject *self, PyObject *dt) zoneinfo_utcoffset() argument
474 zoneinfo_dst(PyObject *self, PyObject *dt) zoneinfo_dst() argument
485 zoneinfo_tzname(PyObject *self, PyObject *dt) zoneinfo_tzname() argument
512 PyZoneInfo_ZoneInfo *self = (PyZoneInfo_ZoneInfo *)obj_self; zoneinfo_fromutc() local
616 zoneinfo_repr(PyZoneInfo_ZoneInfo *self) zoneinfo_repr() argument
633 zoneinfo_str(PyZoneInfo_ZoneInfo *self) zoneinfo_str() argument
659 PyZoneInfo_ZoneInfo *self = (PyZoneInfo_ZoneInfo *)obj_self; zoneinfo_reduce() local
836 load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) load_data() argument
1171 CalendarRule *self = (CalendarRule *)base_self; calendarrule_year_to_timestamp() local
1270 DayRule *self = (DayRule *)base_self; dayrule_year_to_timestamp() local
2134 find_ttinfo(PyZoneInfo_ZoneInfo *self, PyObject *dt) find_ttinfo() argument
[all...]
/third_party/node/deps/v8/tools/testrunner/testproc/
H A Dtimeout.py11 def __init__(self, duration_sec):
12 super(TimeoutProc, self).__init__()
13 self._duration_sec = duration_sec
14 self._start = time.time()
16 def _on_next_test(self, test):
17 self.__on_event()
19 def _on_result_for(self, test, result):
20 self.__on_event()
22 def _on_heartbeat(self):
23 self
[all...]
/third_party/skia/third_party/externals/harfbuzz/test/subset/
H A Drepack_test.py10 def __init__(self, test_path, definition):
11 self.test_path = test_path
12 self.font_name = None
13 self.codepoints = set ()
14 self._parse(definition)
16 def font_path(self):
17 return os.path.join (self._base_path (), "fonts", self.font_name)
19 def codepoints_string (self):
20 return ",".join (self
[all...]
/third_party/python/Tools/scripts/
H A Dreindent.py176 def __init__(self, f):
177 self.find_stmt = 1 # next token begins a fresh stmt?
178 self.level = 0 # current indent level
181 self.raw = f.readlines()
186 self.lines = [_rstrip(line).expandtabs() + "\n"
187 for line in self.raw]
188 self.lines.insert(0, None)
189 self.index = 1 # index into self.lines of next line
195 self
[all...]
/third_party/littlefs/scripts/
H A Dsummary.py67 def __str__(self):
68 if self.x == m.inf:
70 elif self.x == -m.inf:
73 return str(self.x)
75 def __int__(self):
76 assert not m.isinf(self.x)
77 return self.x
79 def __float__(self):
80 return float(self.x)
83 def table(self)
[all...]
/third_party/node/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/
H A DDicer.js40 const self = this
43 self._inHeader = false
44 self._part.emit('header', header)
52 const self = this
54 self.emit('error', new Error('Unexpected end of multipart data'))
55 if (self._part && !self._ignoreData) {
56 const type = (self._isPreamble ? 'Preamble' : 'Part')
57 self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))
58 self
[all...]

Completed in 10 milliseconds

1...<<61626364656667686970>>...192