/third_party/python/Lib/unittest/test/testmock/ |
H A D | testmock.py | 19 def __init__(self): 20 self.thing = iter(['this', 'is', 'an', 'iter']) 22 def __iter__(self): 23 return self 25 def next(self): 26 return next(self.thing) 32 def meth(self, a, b, c, d=None): pass 52 def test_all(self): 59 def test_constructor(self): 62 self [all...] |
/third_party/node/deps/v8/tools/release/ |
H A D | test_scripts.py | 69 def testSaniniziteVersionTags(self): 70 self.assertEquals("4.8.230", SanitizeVersionTag("4.8.230")) 71 self.assertEquals("4.8.230", SanitizeVersionTag("tags/4.8.230")) 72 self.assertEquals(None, SanitizeVersionTag("candidate")) 74 def testNormalizeVersionTags(self): 91 self.assertEquals(expected, NormalizeVersionTags(input)) 93 def testCommand(self): 132 def __init__(self): 133 self._recipe = [] 134 self [all...] |
/third_party/python/Lib/test/ |
H A D | test_platform.py | 72 def clear_caches(self): 78 def test_architecture(self): 83 def test_architecture_via_symlink(self): # issue3762 86 self.assertEqual(py.call_real(*cmd), py.call_link(*cmd)) 88 def test_platform(self): 93 def test_system(self): 96 def test_node(self): 99 def test_release(self): 102 def test_version(self): 105 def test_machine(self) [all...] |
H A D | test_zipfile.py | 61 def setUp(self): 64 fp.write(self.data) 66 def make_test_archive(self, f, compression, compresslevel=None): 72 zipfp.writestr("strfile", self.data) 74 for line in self.line_gen: 77 def zip_test(self, f, compression, compresslevel=None): 78 self.make_test_archive(f, compression, compresslevel) 82 self.assertEqual(zipfp.read(TESTFN), self.data) 83 self [all...] |
H A D | test_posixpath.py | 41 def setUp(self): 42 self.tearDown() 44 def tearDown(self): 49 def test_join(self): 50 self.assertEqual(posixpath.join("/foo", "bar", "/bar", "baz"), 52 self.assertEqual(posixpath.join("/foo", "bar", "baz"), "/foo/bar/baz") 53 self.assertEqual(posixpath.join("/foo/", "bar/", "baz/"), 56 self.assertEqual(posixpath.join(b"/foo", b"bar", b"/bar", b"baz"), 58 self.assertEqual(posixpath.join(b"/foo", b"bar", b"baz"), 60 self [all...] |
H A D | test_range.py | 25 def assert_iterators_equal(self, xs, ys, test_id, limit=None): 37 self.fail('{}: iterator ended unexpectedly ' 40 self.fail('{}: unexpected excess element {} at ' 43 self.fail('{}: wrong element at position {}; ' 46 def test_range(self): 47 self.assertEqual(list(range(3)), [0, 1, 2]) 48 self.assertEqual(list(range(1, 5)), [1, 2, 3, 4]) 49 self.assertEqual(list(range(0)), []) 50 self.assertEqual(list(range(-3)), []) 51 self [all...] |
H A D | test_compile.py | 18 def compile_single(self, source): 21 def assertInvalidSingle(self, source): 22 self.assertRaises(SyntaxError, self.compile_single, source) 24 def test_no_ending_newline(self): 28 def test_empty(self): 31 def test_other_newlines(self): 37 def test_debug_assignment(self): 39 self.assertRaises(SyntaxError, compile, '__debug__ = 1', '?', 'single') 43 self [all...] |
H A D | test_gc.py | 38 # An instance of C1055820 has a self-loop, so becomes cyclic trash when 41 def __init__(self, i): 42 self.i = i 43 self.loop = self 49 def __init__(self): 50 self.gc_happened = False 53 self.gc_happened = True 57 self.wr = weakref.ref(C1055820(666), it_happened) 67 def __init__(self, partne [all...] |
H A D | test_zipapp.py | 20 def setUp(self): 22 self.addCleanup(tmpdir.cleanup) 23 self.tmpdir = pathlib.Path(tmpdir.name) 25 def test_create_archive(self): 27 source = self.tmpdir / 'source' 30 target = self.tmpdir / 'source.pyz' 32 self.assertTrue(target.is_file()) 34 def test_create_archive_with_pathlib(self): 36 source = self.tmpdir / 'source' 39 target = self [all...] |
H A D | test_dict_version.py | 15 def setUp(self): 16 self.seen_versions = set() 17 self.dict = None 19 def check_version_unique(self, mydict): 21 self.assertNotIn(version, self.seen_versions) 22 self.seen_versions.add(version) 24 def check_version_changed(self, mydict, method, *args, **kw): 26 self.check_version_unique(mydict) 29 def check_version_dont_change(self, mydic [all...] |
H A D | test_time.py | 57 def setUp(self): 58 self.t = time.time() 60 def test_data_attributes(self): 66 def test_time(self): 69 self.assertFalse(info.monotonic) 70 self.assertTrue(info.adjustable) 72 def test_time_ns_type(self): 74 self.assertIsInstance(ns, int) 78 self.assertLess((sec_ns - ns), 50 ** 6, (sec, ns)) 99 def test_clock_realtime(self) [all...] |
H A D | test_richcmp.py | 10 def __init__(self, x): 11 self.x = x 13 def __lt__(self, other): 14 return self.x < other 16 def __le__(self, other): 17 return self.x <= other 19 def __eq__(self, other): 20 return self.x == other 22 def __ne__(self, other): 23 return self [all...] |
/third_party/python/Lib/ |
H A D | poplib.py | 98 def __init__(self, host, port=POP3_PORT, 100 self.host = host 101 self.port = port 102 self._tls_established = False 103 sys.audit("poplib.connect", self, host, port) 104 self.sock = self._create_socket(timeout) 105 self.file = self.sock.makefile('rb') 106 self [all...] |
H A D | tarfile.py | 314 def __init__(self, name, mode): 321 self.fd = os.open(name, mode, 0o666) 323 def close(self): 324 os.close(self.fd) 326 def read(self, size): 327 return os.read(self.fd, size) 329 def write(self, s): 330 os.write(self.fd, s) 343 def __init__(self, name, mode, comptype, fileobj, bufsize): 346 self [all...] |
H A D | pdb.py | 121 def __repr__(self): 122 return self 127 # Mutate self to be the "real path". 135 def check(self): 136 if not os.path.exists(self): 137 print('Error:', self.orig, 'does not exist') 141 sys.path[0] = os.path.dirname(self) 144 def filename(self): 145 return self 148 def namespace(self) [all...] |
H A D | datetime.py | 686 self = object.__new__(cls) 687 self._days = d 688 self._seconds = s 689 self._microseconds = us 690 self._hashcode = -1 691 return self 693 def __repr__(self): 695 if self._days: 696 args.append("days=%d" % self._days) 697 if self [all...] |
/third_party/python/Lib/idlelib/ |
H A D | calltip_w.py | 22 def __init__(self, text_widget): 27 # Note: The Text widget will be accessible as self.anchor_widget 30 self.label = self.text = None 31 self.parenline = self.parencol = self.lastline = None 32 self.hideid = self.checkhideid = None 33 self [all...] |
/third_party/python/Tools/peg_generator/pegen/ |
H A D | python_generator.py | 49 def visit_NameLeaf(self, node: NameLeaf) -> bool: 53 def visit_StringLeaf(self, node: StringLeaf) -> bool: 56 def visit_NamedItem(self, node: NamedItem) -> bool: 57 return self.visit(node.item) 59 def visit_Rhs(self, node: Rhs) -> bool: 60 return any(self.visit(alt) for alt in node.alts) 62 def visit_Alt(self, node: Alt) -> bool: 63 return any(self.visit(item) for item in node.items) 65 def lookahead_call_helper(self, node: Lookahead) -> bool: 66 return self [all...] |
/third_party/python/Lib/distutils/tests/ |
H A D | test_upload.py | 48 def __init__(self, url, msg=None, code=None): 49 self.url = url 51 self.req = url 53 self.req = None 54 self.msg = msg or 'OK' 55 self.code = code or 200 57 def getheader(self, name, default=None): 62 def read(self): 65 def getcode(self): 66 return self [all...] |
H A D | test_dir_util.py | 19 def _log(self, msg, *args): 21 self._logs.append(msg % args) 23 self._logs.append(msg) 25 def setUp(self): 26 super(DirUtilTestCase, self).setUp() 27 self._logs = [] 28 tmp_dir = self.mkdtemp() 29 self.root_target = os.path.join(tmp_dir, 'deep') 30 self.target = os.path.join(self [all...] |
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/spec_tools/ |
H A D | conventions.py | 58 def connective(self): 59 if self in (ProseListFormats.OR, ProseListFormats.ANY_OR): 63 def quantifier(self, n): 65 if self == ProseListFormats.ANY_OR: 68 elif self == ProseListFormats.EACH_AND: 79 def __init__(self): 80 self._command_prefix = None 81 self._type_prefix = None 83 def formatVersionOrExtension(self, name): 89 return self [all...] |
/third_party/vulkan-headers/registry/spec_tools/ |
H A D | conventions.py | 58 def connective(self): 59 if self in (ProseListFormats.OR, ProseListFormats.ANY_OR): 63 def quantifier(self, n): 65 if self == ProseListFormats.ANY_OR: 68 elif self == ProseListFormats.EACH_AND: 79 def __init__(self): 80 self._command_prefix = None 81 self._type_prefix = None 83 def formatVersionOrExtension(self, name): 89 return self [all...] |
/third_party/node/deps/v8/tools/testrunner/testproc/ |
H A D | variant_test.py | 22 def __init__(self): 23 super(FakeResultObserver, self).__init__() 25 self.results = set() 27 def result_for(self, test, result): 28 self.results.add((test, result)) 33 def __init__(self, filter_predicate): 34 super(FakeFilter, self).__init__() 36 self._filter_predicate = filter_predicate 38 self.loaded = set() 39 self [all...] |
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | well_known_types.py | 72 def Pack(self, msg, type_url_prefix='type.googleapis.com/', 76 self.type_url = '%s/%s' % (type_url_prefix, msg.DESCRIPTOR.full_name) 78 self.type_url = '%s%s' % (type_url_prefix, msg.DESCRIPTOR.full_name) 79 self.value = msg.SerializeToString(deterministic=deterministic) 81 def Unpack(self, msg): 84 if not self.Is(descriptor): 86 msg.ParseFromString(self.value) 89 def TypeName(self): 92 return self.type_url.split('/')[-1] 94 def Is(self, descripto [all...] |
/third_party/mesa3d/src/panfrost/lib/genxml/ |
H A D | gen_pack.py | 297 def __init__(self, parser, name, attrs): 298 self.parser = parser 299 self.sections = [] 300 self.name = name 301 self.explicit_size = int(attrs["size"]) if "size" in attrs else 0 302 self.size = 0 303 self.align = int(attrs["align"]) if "align" in attrs else None 306 def __init__(self, name): 307 self.name = name 309 def get_size(self) [all...] |