Home
last modified time | relevance | path

Searched full:self (Results 1 – 25 of 5461) sorted by relevance

12345678910>>...219

/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/test/
Dtest_weakset.py16 def __init__(self): argument
17 self.cycle = self
28 def setUp(self): argument
30 self.items = [ustr(c) for c in ('a', 'b', 'c')]
31 self.items2 = [ustr(c) for c in ('x', 'y', 'z')]
32 self.ab_items = [ustr(c) for c in 'ab']
33 self.abcde_items = [ustr(c) for c in 'abcde']
34 self.def_items = [ustr(c) for c in 'def']
35 self.ab_weakset = WeakSet(self.ab_items)
36 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 …]
Dtest_ftplib.py69 def __init__(self, conn, baseclass): argument
70 asynchat.async_chat.__init__(self, conn)
71 self.baseclass = baseclass
72 self.baseclass.last_received_data = ''
73 self.encoding = baseclass.encoding
75 def handle_read(self): argument
76 new_data = self.recv(1024).decode(self.encoding, 'replace')
77 self.baseclass.last_received_data += new_data
79 def handle_close(self): argument
83 if not self.dtp_conn_closed:
[all …]
Dtest_set.py23 def __hash__(self): argument
25 def __eq__(self, other): argument
29 'Used to test self-referential repr() calls'
30 def __repr__(self): argument
31 return repr(self.value)
35 def __init__(self, *args): argument
36 self.hash_count = 0
37 def __hash__(self): argument
38 self.hash_count += 1
39 return int.__hash__(self)
[all …]
Daudiotests.py9 def tell(self): argument
12 def seek(self, *args, **kwargs): argument
19 def setUp(self): argument
20 self.f = self.fout = None
22 def tearDown(self): argument
23 if self.f is not None:
24 self.f.close()
25 if self.fout is not None:
26 self.fout.close()
29 def check_params(self, f, nchannels, sampwidth, framerate, nframes, argument
[all …]
Dtest_with.py14 def __init__(self, *args): argument
16 self.enter_called = False
17 self.exit_called = False
18 self.exit_args = None
20 def __enter__(self): argument
21 self.enter_called = True
22 return _GeneratorContextManager.__enter__(self)
24 def __exit__(self, type, value, traceback): argument
25 self.exit_called = True
26 self.exit_args = (type, value, traceback)
[all …]
Dtest_smtpd.py18 def __init__(self, *args, **kwargs): argument
19 smtpd.SMTPServer.__init__(self, *args, **kwargs)
20 self.messages = []
21 if self._decode_data:
22 self.return_status = 'return status'
24 self.return_status = b'return status'
26 def process_message(self, peer, mailfrom, rcpttos, data, **kw): argument
27 self.messages.append((peer, mailfrom, rcpttos, data))
28 if data == self.return_status:
39 def listen(self, num): argument
[all …]
Dtest_httpservers.py39 def log_message(self, *args): argument
43 def read(self, n=None): argument
48 def __init__(self, test_object, request_handler): argument
49 threading.Thread.__init__(self)
50 self.request_handler = request_handler
51 self.test_object = test_object
53 def run(self): argument
54 self.server = HTTPServer(('localhost', 0), self.request_handler)
55 self.test_object.HOST, self.test_object.PORT = self.server.socket.getsockname()
56 self.test_object.server_started.set()
[all …]
Dtest_array.py27 def __init__(self, typecode, newarg=None): argument
28 array.array.__init__(self)
34 def test_array_is_sequence(self): argument
35 self.assertIsInstance(array.array("B"), collections.abc.MutableSequence)
36 self.assertIsInstance(array.array("B"), collections.abc.Reversible)
38 def test_bad_constructor(self): argument
39 self.assertRaises(TypeError, array.array)
40 self.assertRaises(TypeError, array.array, spam=42)
41 self.assertRaises(TypeError, array.array, 'xx')
42 self.assertRaises(ValueError, array.array, 'x')
[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_mailbox.py30 def _check_sample(self, msg): argument
32 self.assertIsInstance(msg, email.message.Message)
33 self.assertIsInstance(msg, mailbox.Message)
35 self.assertIn(value, msg.get_all(key))
36 self.assertTrue(msg.is_multipart())
37 self.assertEqual(len(msg.get_payload()), len(_sample_payloads))
40 self.assertIsInstance(part, email.message.Message)
41 self.assertNotIsInstance(part, mailbox.Message)
42 self.assertEqual(part.get_payload(), payload)
44 def _delete_recursively(self, target): 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/PyYAML/lib/yaml/
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 …]
/third_party/python/Tools/demo/
Dsortvisu.py34 def __init__(self, master, data=None): argument
35 self.master = master
36 self.frame = Frame(self.master)
37 self.frame.pack(fill=X)
38 self.label = Label(self.frame)
39 self.label.pack()
40 self.canvas = Canvas(self.frame)
41 self.canvas.pack()
42 self.report = Label(self.frame)
43 self.report.pack()
[all …]
/third_party/python/Lib/test/test_asyncio/
Dtest_proactor_events.py35 def setUp(self): argument
37 self.loop = self.new_test_loop()
38 self.addCleanup(self.loop.close)
39 self.proactor = mock.Mock()
40 self.loop._proactor = self.proactor
41 self.protocol = test_utils.make_test_protocol(asyncio.Protocol)
42 self.sock = mock.Mock(socket.socket)
43 self.buffer_size = 65536
45 def socket_transport(self, waiter=None): argument
46 transport = _ProactorSocketTransport(self.loop, self.sock,
[all …]
Dtest_sendfile.py30 def __init__(self, loop=None, close_after=0): argument
31 self.transport = None
32 self.state = 'INITIAL'
33 self.nbytes = 0
35 self.connected = loop.create_future()
36 self.done = loop.create_future()
37 self.data = bytearray()
38 self.close_after = close_after
40 def _assert_state(self, *expected): argument
41 if self.state not in expected:
[all …]
Dtest_selector_events.py30 def _make_self_pipe(self): argument
31 self._ssock = mock.Mock()
32 self._csock = mock.Mock()
33 self._internal_fds += 1
35 def _close_self_pipe(self): argument
54 def setUp(self): argument
56 self.selector = mock.Mock()
57 self.selector.select.return_value = []
58 self.loop = TestBaseSelectorEventLoop(self.selector)
59 self.set_event_loop(self.loop)
[all …]
Dtest_unix_events.py58 def setUp(self): argument
60 self.loop = asyncio.SelectorEventLoop()
61 self.set_event_loop(self.loop)
63 def test_check_signal(self): argument
64 self.assertRaises(
65 TypeError, self.loop._check_signal, '1')
66 self.assertRaises(
67 ValueError, self.loop._check_signal, signal.NSIG + 1)
69 def test_handle_signal_no_handler(self): argument
70 self.loop._handle_signal(signal.NSIG + 1)
[all …]
Dtest_futures.py42 def cancel(self): argument
43 if self.done():
45 self.__cancelled = True
48 def cancelled(self): argument
49 return self.__cancelled
51 def done(self): argument
52 return (self.__cancelled
53 or self.__result is not None
54 or self.__exception is not None)
56 def result(self): argument
[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/asyncio/
Dsslproto.py84 def __init__(self, loop, ssl_protocol): argument
85 self._loop = loop
86 self._ssl_protocol = ssl_protocol
87 self._closed = False
89 def get_extra_info(self, name, default=None): argument
91 return self._ssl_protocol._get_extra_info(name, default)
93 def set_protocol(self, protocol): argument
94 self._ssl_protocol._set_app_protocol(protocol)
96 def get_protocol(self): argument
97 return self._ssl_protocol._app_protocol
[all …]
Dproactor_events.py50 def __init__(self, loop, sock, protocol, waiter=None, argument
53 self._set_extra(sock)
54 self._sock = sock
55 self.set_protocol(protocol)
56 self._server = server
57 self._buffer = None # None or bytearray.
58 self._read_fut = None
59 self._write_fut = None
60 self._pending_write = 0
61 self._conn_lost = 0
[all …]
/third_party/vk-gl-cts/modules/gles31/scripts/
Dgenutil.py33 def __init__(self, name, description, children): argument
34 self.name = name
35 self.description = description
36 self.children = children
39 def __init__(self): argument
144 def __init__(self): argument
147 def uniformVec4(self, count, mn, mx): argument
154 def uniformBVec4(self, count): argument
160 # def uniform(self,
229 def __init__(self, x): argument
[all …]
/third_party/vk-gl-cts/modules/gles3/scripts/
Dgenutil.py33 def __init__(self, name, description, children): argument
34 self.name = name
35 self.description = description
36 self.children = children
39 def __init__(self): argument
144 def __init__(self): argument
147 def uniformVec4(self, count, mn, mx): argument
154 def uniformBVec4(self, count): argument
160 # def uniform(self,
229 def __init__(self, x): argument
[all …]

12345678910>>...219