/third_party/python/Lib/test/ |
H A D | test_robotparser.py | 19 def setUp(self): 20 lines = io.StringIO(self.robots_txt).readlines() 21 self.parser = urllib.robotparser.RobotFileParser() 22 self.parser.parse(lines) 24 def get_agent_and_url(self, url): 28 return self.agent, url 30 def test_good_urls(self): 31 for url in self.good: 32 agent, url = self.get_agent_and_url(url) 33 with self [all...] |
H A D | test_hash.py | 52 def same_hash(self, *objlist): 58 self.fail("hashed values differ: %r" % (objlist,)) 60 def test_numeric_literals(self): 61 self.same_hash(1, 1, 1.0, 1.0+0.0j) 62 self.same_hash(0, 0.0, 0.0+0.0j) 63 self.same_hash(-1, -1.0, -1.0+0.0j) 64 self.same_hash(-2, -2.0, -2.0+0.0j) 66 def test_coerced_integers(self): 67 self.same_hash(int(1), int(1), float(1), complex(1), 69 self [all...] |
H A D | test_context.py | 27 def test_context_var_new_1(self): 28 with self.assertRaisesRegex(TypeError, 'takes exactly 1'): 31 with self.assertRaisesRegex(TypeError, 'must be a str'): 35 self.assertEqual(c.name, 'aaa') 37 with self.assertRaises(AttributeError): 40 self.assertNotEqual(hash(c), hash('aaa')) 43 def test_context_var_repr_1(self): 45 self.assertIn('a', repr(c)) 48 self.assertIn('123', repr(c)) 53 self [all...] |
H A D | test_coroutines.py | 17 def __init__(self, obj): 18 self.obj = obj 20 def __await__(self): 21 yield from self.obj 25 def __init__(self, value): 26 self.value = value 28 def __await__(self): 29 yield self.value 81 def test_badsyntax_1(self): 403 with self [all...] |
/third_party/python/Lib/test/libregrtest/ |
H A D | save_env.py | 37 def __init__(self, testname, verbose=0, quiet=False, *, pgo=False): 38 self.testname = testname 39 self.verbose = verbose 40 self.quiet = quiet 41 self.pgo = pgo 68 def get_module(self, name): 72 def try_get_module(self, name): 75 return self.get_module(name) 79 def get_urllib_requests__url_tempfiles(self): 80 urllib_request = self [all...] |
/third_party/node/deps/v8/tools/ |
H A D | stats-viewer.py | 66 def __init__(self, data_name, name_filter): 73 self.data_name = data_name 74 self.name_filter = name_filter 78 self.shared_mmap = None 82 self.ui_counters = {} 85 self.data = None 88 self.root = None 90 def Run(self): 93 self.data = self [all...] |
/third_party/python/Lib/turtledemo/ |
H A D | __main__.py | 129 def __init__(self, filename=None): 130 self.root = root = turtle._root = Tk() 132 root.wm_protocol("WM_DELETE_WINDOW", self._destroy) 155 self.mBar = Menu(root, relief=RAISED, borderwidth=2) 156 self.mBar.add_cascade(menu=self.makeLoadDemoMenu(self.mBar), 158 self.mBar.add_cascade(menu=self.makeFontMenu(self [all...] |
/third_party/python/Lib/ |
H A D | ftplib.py | 87 Then use self.connect() with optional host and port argument. 109 def __init__(self, host='', user='', passwd='', acct='', 117 self.encoding = encoding 118 self.source_address = source_address 119 self.timeout = timeout 121 self.connect(host) 123 self.login(user, passwd, acct) 125 def __enter__(self): 126 return self 129 def __exit__(self, *arg [all...] |
/third_party/python/Lib/unittest/test/ |
H A D | support.py | 8 def test_eq(self): 9 for obj_1, obj_2 in self.eq_pairs: 10 self.assertEqual(obj_1, obj_2) 11 self.assertEqual(obj_2, obj_1) 14 def test_ne(self): 15 for obj_1, obj_2 in self.ne_pairs: 16 self.assertNotEqual(obj_1, obj_2) 17 self.assertNotEqual(obj_2, obj_1) 23 def test_hash(self): 24 for obj_1, obj_2 in self [all...] |
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | message_test.py | 119 def testBadUtf8String(self, message_module): 121 self.skipTest("Skipping testBadUtf8String, currently only the python " 125 with self.assertRaises(UnicodeDecodeError) as context: 127 self.assertIn('TestAllTypes.optional_string', str(context.exception)) 129 def testGoldenMessage(self, message_module): 142 test_util.ExpectAllFieldsSet(self, golden_message) 143 self.assertEqual(golden_data, golden_message.SerializeToString()) 145 self.assertEqual(golden_data, golden_copy.SerializeToString()) 147 def testGoldenPackedMessage(self, message_module): 153 self [all...] |
/third_party/python/Lib/distutils/tests/ |
H A D | test_file_util.py | 17 def _log(self, msg, *args): 19 self._logs.append(msg % args) 21 self._logs.append(msg) 23 def setUp(self): 24 super(FileUtilTestCase, self).setUp() 25 self._logs = [] 26 self.old_log = log.info 27 log.info = self._log 28 tmp_dir = self.mkdtemp() 29 self [all...] |
/third_party/python/ |
H A D | setup.py | 299 def __init__(self, dist): 300 build_ext.__init__(self, dist) 301 self.srcdir = None 302 self.lib_dirs = None 303 self.inc_dirs = None 304 self.config_h_vars = None 305 self.failed = [] 306 self.failed_on_import = [] 307 self.missing = [] 308 self 598 self.failed or self.failed_on_import or self.missing global() namespace [all...] |
/third_party/python/Lib/test/test_asyncio/ |
H A D | test_locks.py | 28 async def test_repr(self): 30 self.assertTrue(repr(lock).endswith('[unlocked]>')) 31 self.assertTrue(RGX_REPR.match(repr(lock))) 34 self.assertTrue(repr(lock).endswith('[locked]>')) 35 self.assertTrue(RGX_REPR.match(repr(lock))) 37 async def test_lock(self): 40 with self.assertRaisesRegex( 46 self.assertFalse(lock.locked()) 48 async def test_lock_doesnt_accept_loop_parameter(self): 60 with self [all...] |
H A D | test_ssl.py | 36 def __init__(self, loop=None): 37 self.transport = None 38 self.state = 'INITIAL' 39 self.nbytes = 0 41 self.connected = asyncio.Future(loop=loop) 42 self.done = asyncio.Future(loop=loop) 44 def connection_made(self, transport): 45 self.transport = transport 46 assert self.state == 'INITIAL', self [all...] |
/third_party/skia/third_party/externals/spirv-tools/test/tools/ |
H A D | placeholder.py | 37 def instantiate_for_spirv_args(self, testcase): 48 def instantiate_for_expectation(self, testcase): 63 def __init__(self, source, suffix, assembly_substr=None): 66 self.source = source 67 self.suffix = suffix 68 self.filename = None 71 self.assembly_substr = assembly_substr 73 def instantiate_for_spirv_args(self, testcase): 79 shader, self.filename = tempfile.mkstemp( 80 dir=testcase.directory, suffix=self [all...] |
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/test/tools/ |
H A D | placeholder.py | 37 def instantiate_for_spirv_args(self, testcase): 48 def instantiate_for_expectation(self, testcase): 63 def __init__(self, source, suffix, assembly_substr=None): 66 self.source = source 67 self.suffix = suffix 68 self.filename = None 71 self.assembly_substr = assembly_substr 73 def instantiate_for_spirv_args(self, testcase): 79 shader, self.filename = tempfile.mkstemp( 80 dir=testcase.directory, suffix=self [all...] |
/third_party/spirv-tools/test/tools/ |
H A D | placeholder.py | 37 def instantiate_for_spirv_args(self, testcase): 48 def instantiate_for_expectation(self, testcase): 63 def __init__(self, source, suffix, assembly_substr=None): 66 self.source = source 67 self.suffix = suffix 68 self.filename = None 71 self.assembly_substr = assembly_substr 73 def instantiate_for_spirv_args(self, testcase): 79 shader, self.filename = tempfile.mkstemp( 80 dir=testcase.directory, suffix=self [all...] |
/third_party/python/Tools/peg_generator/pegen/ |
H A D | parser_generator.py | 46 def __init__(self, rules: Dict[str, Rule], callmakervisitor: GrammarVisitor) -> None: 47 self.rulses = rules 48 self.callmaker = callmakervisitor 50 def visit_Rule(self, rule: Rule) -> None: 51 self.visit(rule.flatten()) 53 def visit_NamedItem(self, item: NamedItem) -> None: 54 self.callmaker.visit(item) 60 def __init__(self, gen: "ParserGenerator", keywords: Dict[str, int], soft_keywords: Set[str]): 61 self.generator = gen 62 self [all...] |
/third_party/python/Lib/idlelib/ |
H A D | query.py | 38 def __init__(self, parent, title, message, *, text0='', used_names={}, 52 self.parent = parent # Needed for Font call. 53 self.message = message 54 self.text0 = text0 55 self.used_names = used_names 57 Toplevel.__init__(self, parent) 58 self.withdraw() # Hide while configuring, especially geometry. 59 self.title(title) 60 self.transient(parent) 62 self [all...] |
/third_party/skia/third_party/externals/angle2/third_party/logdog/logdog/ |
H A D | stream.py | 56 def validate(self): 58 streamname.validate_stream_name(self.name) 60 if self.type not in (self.TEXT, self.BINARY, self.DATAGRAM): 61 raise ValueError('Invalid type (%s)' % (self.type,)) 63 if self.tags is not None: 64 if not isinstance(self.tags, _MAPPING): 65 raise ValueError('Invalid tags type (%s)' % (self [all...] |
/third_party/python/Lib/email/ |
H A D | headerregistry.py | 14 def __init__(self, display_name='', username='', domain='', addr_spec=None): 52 self._display_name = display_name 53 self._username = username 54 self._domain = domain 57 def display_name(self): 58 return self._display_name 61 def username(self): 62 return self._username 65 def domain(self): 66 return self [all...] |
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/ |
H A D | validitygenerator.py | 21 def __init__(self, msg=None): 78 def __init__(self, *args, **kwargs): 81 self.currentExtension = '' 84 self.trace = False 87 def null(self): 92 return self.conventions.null 95 def structtype_member_name(self): 100 return self.conventions.structtype_member_name 103 def nextpointer_member_name(self): 108 return self [all...] |
/third_party/skia/third_party/externals/tint/tools/ |
H A D | run_tests.py | 40 def __init__(self, input_path, parse_only): 41 self.input_path = input_path 42 self.parse_only = parse_only 43 self.results = {} 45 def IsExpectedFail(self): 47 return fail_re.match(self.GetInputPath()) 49 def IsParseOnly(self): 50 return self.parse_only 52 def GetInputPath(self): 53 return self [all...] |
/third_party/googletest/googletest/test/ |
H A D | googletest-filter-unittest.py | 249 def AssertSetEqual(self, lhs, rhs): 253 self.assert_(elem in rhs, '%s in %s' % (elem, rhs)) 256 self.assert_(elem in lhs, '%s in %s' % (elem, lhs)) 258 def AssertPartitionIsValid(self, set_var, list_of_sets): 264 self.assertEqual(len(set_var), len(full_partition)) 265 self.assertEqual(set(set_var), set(full_partition)) 267 def AdjustForParameterizedTests(self, tests_to_run): 276 def RunAndVerify(self, gtest_filter, tests_to_run): 279 tests_to_run = self.AdjustForParameterizedTests(tests_to_run) 293 self [all...] |
/third_party/python/Lib/dbm/ |
H A D | dumb.py | 48 def __init__(self, filebasename, mode, flag='c'): 49 filebasename = self._os.fsencode(filebasename) 50 self._mode = mode 51 self._readonly = (flag == 'r') 58 self._dirfile = filebasename + b'.dir' 64 self._datfile = filebasename + b'.dat' 65 self._bakfile = filebasename + b'.bak' 68 self._index = None # maps keys to (pos, siz) pairs 71 self._create(flag) 72 self [all...] |