Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 5004) sorted by relevance

12345678910>>...201

/third_party/glib/gio/gdbus-2.0/codegen/
Ddbustypes.py27 def __init__(self, key, value): argument
28 self.key = key
29 self.value = value
30 self.annotations = []
31 self.since = ""
33 def post_process(self, interface_prefix, cns, cns_upper, cns_lower, container): argument
34 key = self.key
36 self.annotations, "org.gtk.GDBus.C.Name"
39 self.key_lower = overridden_key.lower()
43 self.key_lower = (
[all …]
/third_party/python/Lib/lib2to3/tests/
Dtest_util.py22 def assertStr(self, node, string): argument
25 self.assertEqual(str(node), string)
29 def is_tuple(self, string): argument
32 def test_valid(self): argument
33 self.assertTrue(self.is_tuple("(a, b)"))
34 self.assertTrue(self.is_tuple("(a, (b, c))"))
35 self.assertTrue(self.is_tuple("((a, (b, c)),)"))
36 self.assertTrue(self.is_tuple("(a,)"))
37 self.assertTrue(self.is_tuple("()"))
39 def test_invalid(self): argument
[all …]
/third_party/python/Lib/test/
Dstring_tests.py10 def __init__(self, seq='wxyz'): self.seq = seq argument
11 def __len__(self): return len(self.seq) argument
12 def __getitem__(self, i): return self.seq[i] argument
15 def __init__(self): self.seq = [7, 'hello', 123] argument
16 def __str__(self): return '{0} {1} {2}'.format(*self.seq) argument
19 def __init__(self): self.seq = ['a', 'b', 'c'] argument
20 def __len__(self): return 8 argument
39 def fixtype(self, obj): argument
41 return self.__class__.type2test(obj)
43 return [self.fixtype(x) for x in obj]
[all …]
Dtest_weakset.py14 def __init__(self): argument
15 self.cycle = self
20 def setUp(self): argument
22 self.items = [ustr(c) for c in ('a', 'b', 'c')]
23 self.items2 = [ustr(c) for c in ('x', 'y', 'z')]
24 self.ab_items = [ustr(c) for c in 'ab']
25 self.abcde_items = [ustr(c) for c in 'abcde']
26 self.def_items = [ustr(c) for c in 'def']
27 self.ab_weakset = WeakSet(self.ab_items)
28 self.abcde_weakset = WeakSet(self.abcde_items)
[all …]
Dtest_index.py7 def __index__(self): argument
8 return self.ind
11 def __index__(self): argument
12 return int(self)
15 def setUp(self): argument
16 self.o = newstyle()
17 self.n = newstyle()
19 def test_basic(self): argument
20 self.o.ind = -2
21 self.n.ind = 2
[all …]
Dseq_tests.py20 def __init__(self, seqn): argument
21 self.seqn = seqn
22 def __getitem__(self, i): argument
23 return self.seqn[i]
27 def __init__(self, seqn): argument
28 self.seqn = seqn
29 self.i = 0
30 def __iter__(self): argument
31 return self
32 def __next__(self): argument
[all …]
Dtest_parser.py23 def roundtrip(self, f, s): argument
29 self.fail("could not roundtrip %r: %s" % (s, why))
31 self.assertEqual(t, st2.totuple(),
34 def check_expr(self, s): argument
35 self.roundtrip(parser.expr, s)
37 def test_flags_passed(self): argument
44 self.assertIsInstance(scope["x"], str)
46 def check_suite(self, s): argument
47 self.roundtrip(parser.suite, s)
49 def test_yield_statement(self): argument
[all …]
Dtest_set.py22 def __hash__(self): argument
24 def __eq__(self, other): argument
29 def __repr__(self): argument
30 return repr(self.value)
34 def __init__(self, *args): argument
35 self.hash_count = 0
36 def __hash__(self): argument
37 self.hash_count += 1
38 return int.__hash__(self)
43 def setUp(self): argument
[all …]
Dtest_optparse.py28 def __init__(self, argument
32 self.error_message = error_message
33 self.exit_status = exit_status
34 self.exit_message = exit_message
36 def __str__(self): argument
37 return self.error_message or self.exit_message or "intercepted error"
40 def exit(self, status=0, msg=None): argument
43 def error(self, msg): argument
48 def assertParseOK(self, args, expected_opts, expected_positional_args): argument
61 (options, positional_args) = self.parser.parse_args(args)
[all …]
Dtest_unparse.py119 def assertASTEqual(self, ast1, ast2): argument
120 self.assertEqual(ast.dump(ast1), ast.dump(ast2))
122 def check_ast_roundtrip(self, code1, **kwargs): argument
123 with self.subTest(code1=code1, ast_parse_kwargs=kwargs):
127 self.assertASTEqual(ast1, ast2)
129 def check_invalid(self, node, raises=ValueError): argument
130 with self.subTest(node=node):
131 self.assertRaises(raises, ast.unparse, node)
133 def get_source(self, code1, code2=None): argument
138 def check_src_roundtrip(self, code1, code2=None): argument
[all …]
/third_party/python/Lib/tkinter/test/test_ttk/
Dtest_widgets.py19 def test_configure_class(self): argument
20 widget = self.create()
21 self.assertEqual(widget['class'], '')
25 self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
26 widget2 = self.create(class_='Foo')
27 self.assertEqual(widget2['class'], 'Foo')
29 def test_configure_padding(self): argument
30 widget = self.create()
31 self.checkParam(widget, 'padding', 0, expected=('0',))
32 self.checkParam(widget, 'padding', 5, expected=('5',))
[all …]
/third_party/python/Lib/test/test_importlib/
Dtest_spec.py18 def __init__(self, path=None, is_package=None): argument
19 self.path = path
20 self.package = is_package
22 def __repr__(self): argument
25 def __getattr__(self, name): argument
26 if name == 'get_filename' and self.path is not None:
27 return self._get_filename
29 return self._is_package
32 def _get_filename(self, name): argument
33 return self.path
[all …]
/third_party/python/Lib/tkinter/
Dtix.py82 def tix_addbitmapdir(self, directory): argument
92 return self.tk.call('tix', 'addbitmapdir', directory)
94 def tix_cget(self, option): argument
99 return self.tk.call('tix', 'cget', option)
101 def tix_configure(self, cnf=None, **kw): argument
118 return self._getconfigure('tix', 'configure')
120 return self._getconfigure1('tix', 'configure', '-'+cnf)
121 return self.tk.call(('tix', 'configure') + self._options(cnf))
123 def tix_filedialog(self, dlgclass=None): argument
133 return self.tk.call('tix', 'filedialog', dlgclass)
[all …]
D__init__.py234 def __repr__(self): argument
235 attrs = {k: v for k, v in self.__dict__.items() if v != '??'}
236 if not self.char:
238 elif self.char != '??':
239 attrs['char'] = repr(self.char)
240 if not getattr(self, 'send_event', True):
242 if self.state == 0:
244 elif isinstance(self.state, int):
245 state = self.state
257 if self.delta == 0:
[all …]
/third_party/pyyaml/lib3/yaml/
Dscanner.py38 def __init__(self, token_number, required, index, line, column, mark): argument
39 self.token_number = token_number
40 self.required = required
41 self.index = index
42 self.line = line
43 self.column = column
44 self.mark = mark
48 def __init__(self): argument
60 self.done = False
64 self.flow_level = 0
[all …]
Demitter.py18 def __init__(self, scalar, empty, multiline, argument
22 self.scalar = scalar
23 self.empty = empty
24 self.multiline = multiline
25 self.allow_flow_plain = allow_flow_plain
26 self.allow_block_plain = allow_block_plain
27 self.allow_single_quoted = allow_single_quoted
28 self.allow_double_quoted = allow_double_quoted
29 self.allow_block = allow_block
38 def __init__(self, stream, canonical=None, indent=None, width=None, argument
[all …]
Dparser.py81 def __init__(self): argument
82 self.current_event = None
83 self.yaml_version = None
84 self.tag_handles = {}
85 self.states = []
86 self.marks = []
87 self.state = self.parse_stream_start
89 def dispose(self): argument
91 self.states = []
92 self.state = None
[all …]
/third_party/python/Lib/
Dwave.py125 def initfp(self, file): argument
126 self._convert = None
127 self._soundpos = 0
128 self._file = Chunk(file, bigendian = 0)
129 if self._file.getname() != b'RIFF':
131 if self._file.read(4) != b'WAVE':
133 self._fmt_chunk_read = 0
134 self._data_chunk = None
136 self._data_seek_needed = 1
138 chunk = Chunk(self._file, bigendian = 0)
[all …]
Dsunau.py159 def __init__(self, f): argument
163 self._opened = True
165 self._opened = False
166 self.initfp(f)
168 def __del__(self): argument
169 if self._file:
170 self.close()
172 def __enter__(self): argument
173 return self
175 def __exit__(self, *args): argument
[all …]
/third_party/python/Tools/scripts/
Dtexi2html.py103 def __init__(self, dir, name, topname, title, next, prev, up): argument
104 self.dirname = dir
105 self.name = name
107 self.topname = topname
109 self.topname = name
110 self.title = title
111 self.next = next
112 self.prev = prev
113 self.up = up
114 self.lines = []
[all …]
/third_party/pyyaml/lib/yaml/
Dscanner.py38 def __init__(self, token_number, required, index, line, column, mark): argument
39 self.token_number = token_number
40 self.required = required
41 self.index = index
42 self.line = line
43 self.column = column
44 self.mark = mark
48 def __init__(self): argument
60 self.done = False
64 self.flow_level = 0
[all …]
/third_party/python/Lib/test/test_email/
Dtest__header_value_parser.py12 def test_EWWhiteSpaceTerminal(self): argument
14 self.assertEqual(x, ' \t')
15 self.assertEqual(str(x), '')
16 self.assertEqual(x.value, '')
17 self.assertEqual(x.token_type, 'fws')
22 def _assert_results(self, tl, rest, string, value, defects, remainder, argument
24 self.assertEqual(str(tl), string)
25 self.assertEqual(tl.value, value)
26 self.assertDefectsEqual(tl.all_defects, defects)
27 self.assertEqual(rest, remainder)
[all …]
/third_party/python/Lib/unittest/test/
Dtest_case.py33 def runTest(self): pass argument
34 def test1(self): pass argument
37 def test2(self): pass argument
42 def __init__(self, events): argument
43 super(Test.LoggingTestCase, self).__init__('test')
44 self.events = events
46 def setUp(self): argument
47 self.events.append('setUp')
49 def test(self): argument
50 self.events.append('test')
[all …]
/third_party/python/Lib/ctypes/test/
Dtest_cfuncs.py13 def S(self): argument
14 return c_longlong.in_dll(self._dll, "last_tf_arg_s").value
15 def U(self): argument
16 return c_ulonglong.in_dll(self._dll, "last_tf_arg_u").value
18 def test_byte(self): argument
19 self._dll.tf_b.restype = c_byte
20 self._dll.tf_b.argtypes = (c_byte,)
21 self.assertEqual(self._dll.tf_b(-126), -42)
22 self.assertEqual(self.S(), -126)
24 def test_byte_plus(self): argument
[all …]
/third_party/python/Lib/distutils/command/
Dinstall.py146 def initialize_options(self): argument
150 self.prefix = None
151 self.exec_prefix = None
152 self.home = None
153 self.user = 0
158 self.install_base = None
159 self.install_platbase = None
160 self.root = None
166 self.install_purelib = None # for pure module distributions
167 self.install_platlib = None # non-pure (dists w/ extensions)
[all …]

12345678910>>...201