Home
last modified time | relevance | path

Searched refs:self (Results 301 - 325 of 5003) sorted by relevance

1...<<11121314151617181920>>...201

/third_party/python/Tools/c-analyzer/c_parser/parser/
H A D_info.py8 def __init__(self, text, start=None, end=None):
12 self.start = start
16 self.text = text.strip()
19 self.end = end
20 self.line = lines[-1]
22 def __repr__(self):
23 args = (f'{a}={getattr(self, a)!r}'
25 return f'{type(self).__name__}({", ".join(args)})'
27 def add_line(self, line, lno=None):
29 lno = self
[all...]
/third_party/python/Lib/
H A Dxdrlib.py27 def __init__(self, msg):
28 self.msg = msg
29 def __repr__(self):
30 return repr(self.msg)
31 def __str__(self):
32 return str(self.msg)
42 def result(self, value):
44 return function(self, value)
53 def __init__(self):
54 self
[all...]
H A Dzipfile.py374 def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)):
375 self.orig_filename = filename # Original file name in archive
388 self.filename = filename # Normalized file name
389 self.date_time = date_time # year, month, day, hour, min, sec
395 self.compress_type = ZIP_STORED # Type of compression for the file
396 self._compresslevel = None # Level for the compressor
397 self.comment = b"" # Comment for each file
398 self.extra = b"" # ZIP extra data
400 self.create_system = 0 # System which created ZIP archive
403 self
[all...]
H A Dasyncore.py225 def __init__(self, sock=None, map=None):
227 self._map = socket_map
229 self._map = map
231 self._fileno = None
237 self.set_socket(sock, map)
238 self.connected = True
242 self.addr = sock.getpeername()
247 self.connected = False
252 self.del_channel(map)
255 self
[all...]
H A Dmailbox.py37 def __init__(self, path, factory=None, create=True):
39 self._path = os.path.abspath(os.path.expanduser(path))
40 self._factory = factory
42 def add(self, message):
46 def remove(self, key):
50 def __delitem__(self, key):
51 self.remove(key)
53 def discard(self, key):
56 self.remove(key)
60 def __setitem__(self, ke
[all...]
/third_party/python/Lib/test/
H A Dtest_dict.py16 def test_invalid_keyword_arguments(self):
20 with self.assertRaises(TypeError):
22 with self.assertRaises(TypeError):
25 def test_constructor(self):
27 self.assertEqual(dict(), {})
28 self.assertIsNot(dict(), {})
30 def test_literal_constructor(self):
39 self.assertEqual(eval(dictliteral), dict(items))
41 def test_merge_operator(self):
49 self
[all...]
H A Dtest_launcher.py143 def __init__(self, path, content):
144 self.path = Path(path)
145 self.content = content
146 self._preserved = None
148 def __enter__(self):
150 self._preserved = self.path.read_bytes()
152 self._preserved = None
153 self.path.write_text(self
[all...]
H A Dtest_ordered_dict.py34 def test_init(self):
35 OrderedDict = self.OrderedDict
36 with self.assertRaises(TypeError):
39 self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input
40 self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input
41 self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input
42 self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)],
46 self.assertEqual(list(OrderedDict(self=42).items()), [('self', 4
[all...]
H A Dtest_augassign.py7 def testBasic(self):
19 self.assertEqual(x, 3.0)
21 def test_with_unpacking(self):
22 self.assertRaises(SyntaxError, compile, "x, b += 3", "<test>", "exec")
24 def testInList(self):
36 self.assertEqual(x[0], 3.0)
38 def testInDict(self):
50 self.assertEqual(x[0], 3.0)
52 def testSequences(self):
57 self
[all...]
H A Dtest_trace.py103 def __init__(self, x):
104 self.a = x
106 def inst_method_linear(self, y):
107 return self.a + y
109 def inst_method_calling(self, x):
110 c = self.inst_method_linear(x)
127 def setUp(self):
128 self.addCleanup(sys.settrace, sys.gettrace())
129 self.tracer = Trace(count=1, trace=0, countfuncs=0, countcallers=0)
130 self
[all...]
H A Dtest_builtin.py43 def __init__(self, max):
44 self.max = max
45 self.sofar = []
47 def __len__(self): return len(self.sofar)
49 def __getitem__(self, i):
50 if not 0 <= i < self.max: raise IndexError
51 n = len(self.sofar)
53 self.sofar.append(n*n)
55 return self
[all...]
H A Dtest_long.py123 def getran(self, ndigits):
124 self.assertGreater(ndigits, 0)
133 self.assertTrue(1 <= bits <= SHIFT)
139 self.assertTrue(nbits_lo <= nbits <= nbits_hi)
155 def check_division(self, x, y):
156 eq = self.assertEqual
157 with self.subTest(x=x, y=y):
166 self.assertTrue(0 <= r < y, "bad mod from divmod")
168 self.assertTrue(y < r <= 0, "bad mod from divmod")
170 def test_division(self)
[all...]
/third_party/node/tools/gyp/pylib/gyp/
H A Dxcodeproj_file.py290 def __init__(self, properties=None, id=None, parent=None):
291 self.id = id
292 self.parent = parent
293 self._properties = {}
294 self._hashables = []
295 self._SetDefaultsFromSchema()
296 self.UpdateProperties(properties)
298 def __repr__(self):
300 name = self.Name()
302 return f"<{self
[all...]
/third_party/node/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/
H A Dxcodeproj_file.py290 def __init__(self, properties=None, id=None, parent=None):
291 self.id = id
292 self.parent = parent
293 self._properties = {}
294 self._hashables = []
295 self._SetDefaultsFromSchema()
296 self.UpdateProperties(properties)
298 def __repr__(self):
300 name = self.Name()
302 return f"<{self
[all...]
/third_party/python/Lib/test/test_email/
H A Dtest_contentmanager.py21 def get_key_as_get_content_key(self, order, key):
27 m = self._make_message()
30 self.assertEqual(cm.get_content(m, foo='bar'), ('bar', 'foo'))
32 def get_key_as_get_content_key_order(self, order, key):
39 for precedence, key in self.get_key_params.values():
42 m = self._make_message()
46 self.assertEqual(cm.get_content(m), ('foo'))
48 def test_get_content_raises_if_unknown_mimetype_and_no_default(self):
50 m = self._make_message()
52 with self
[all...]
/third_party/skia/third_party/externals/brotli/research/
H A Dbrotlidump.py50 def __init__(self, byteString):
51 self.data = byteString
53 self.pos = 0
55 def __repr__(self):
60 return "BitStream(pos={:x}:{})".format(self.pos>>3, self.pos&7)
62 def read(self, n):
73 value = self.peek(n)
74 self.pos += n
75 if self
[all...]
/third_party/mesa3d/src/gallium/tools/trace/
H A Dformat.py36 def __init__(self, stream):
37 self.stream = stream
39 def text(self, text):
40 self.stream.write(text)
42 def newline(self):
43 self.text('\n')
45 def function(self, name):
46 self.text(name)
48 def variable(self, name):
49 self
[all...]
/third_party/node/deps/v8/tools/testrunner/objects/
H A Dtestcase.py77 def __init__(self, suite, path, name, test_config):
78 self.suite = suite # TestSuite object
80 self.path = path # string, e.g. 'div-mod', 'test-api/foo'
81 self.name = name # string that identifies test in the status file
83 self.variant = None # name of the used testing variant
84 self.variant_flags = [] # list of strings, flags specific to this test
87 self.origin = None # Test that this test is subtest of.
88 self.processor = None # Processor that created this subtest.
89 self.procid = '%s/%s' % (self
[all...]
/third_party/python/Lib/idlelib/
H A Dconfig_key.py49 def __init__(self, parent, action, current_key_sequences):
58 self['borderwidth'] = 2
59 self['relief'] = 'sunken'
60 self.parent = parent
61 self.action = action
62 self.current_key_sequences = current_key_sequences
63 self.result = ''
64 self.key_string = StringVar(self)
65 self
[all...]
/third_party/node/deps/openssl/openssl/util/perl/TLSProxy/
H A DClientHello.pm24 my $self = $class->SUPER::new(
32 $self->{client_version} = 0;
33 $self->{random} = [];
34 $self->{session_id_len} = 0;
35 $self->{session} = "";
36 $self->{ciphersuite_len} = 0;
37 $self->{ciphersuites} = [];
38 $self->{comp_meth_len} = 0;
39 $self->{comp_meths} = [];
40 $self
[all...]
/third_party/openssl/util/perl/TLSProxy/
H A DClientHello.pm24 my $self = $class->SUPER::new(
32 $self->{client_version} = 0;
33 $self->{random} = [];
34 $self->{session_id_len} = 0;
35 $self->{session} = "";
36 $self->{ciphersuite_len} = 0;
37 $self->{ciphersuites} = [];
38 $self->{comp_meth_len} = 0;
39 $self->{comp_meths} = [];
40 $self
[all...]
/third_party/python/Lib/idlelib/idle_test/
H A Dtest_searchbase.py3 # testing skipping of suite when self.needwrapbutton is false.
39 def setUp(self):
40 self.engine = se.SearchEngine(self.root) # None also seems to work
41 self.dialog = sdb.SearchDialogBase(root=self.root, engine=self.engine)
43 def tearDown(self):
44 self.dialog.close()
46 def test_open_and_close(self)
[all...]
/third_party/python/Lib/unittest/test/testmock/
H A Dtesthelpers.py15 def one(self, a, b): pass
16 def two(self): pass
17 def three(self, a=None): pass
23 def test_any(self):
24 self.assertEqual(ANY, object())
34 def test_repr(self):
35 self.assertEqual(repr(ANY), '<ANY>')
36 self.assertEqual(str(ANY), '<ANY>')
39 def test_any_and_datetime(self):
46 def test_any_mock_calls_comparison_order(self)
[all...]
/third_party/mbedtls/tests/scripts/
H A Dtest_generate_test_code.py34 def test_dependencies_list(self):
44 self.assertEqual(preprocessor1, '#if defined(DEP1)',
46 self.assertEqual(preprocessor2, '#if defined(DEP2)',
48 self.assertEqual(endif1, '#endif /* DEP2 */',
50 self.assertEqual(endif2, '#endif /* DEP1 */',
53 def test_disabled_dependencies_list(self):
63 self.assertEqual(preprocessor1, '#if !defined(DEP1)',
65 self.assertEqual(preprocessor2, '#if !defined(DEP2)',
67 self.assertEqual(endif1, '#endif /* !DEP2 */',
69 self
[all...]
/third_party/python/Lib/asyncio/
H A Devents.py31 def __init__(self, callback, args, loop, context=None):
34 self._context = context
35 self._loop = loop
36 self._callback = callback
37 self._args = args
38 self._cancelled = False
39 self._repr = None
40 if self._loop.get_debug():
41 self._source_traceback = format_helpers.extract_stack(
44 self
[all...]

Completed in 16 milliseconds

1...<<11121314151617181920>>...201