/third_party/python/Lib/test/ |
H A D | test_codeccallbacks.py | 12 def __init__(self): 13 self.pos = 0 15 def handle(self, exc): 16 oldpos = self.pos 23 self.pos = len(exc.object) 27 def __init__(self, repl="<?>"): 28 self.repl = repl 29 self.pos = 0 30 self.count = 0 32 def handle(self, ex [all...] |
H A D | test_struct.py | 37 def test_isbigendian(self): 38 self.assertEqual((struct.pack('=i', 1)[0] == 0), ISBIGENDIAN) 40 def test_consistence(self): 41 self.assertRaises(struct.error, struct.calcsize, 'Z') 44 self.assertEqual(sz * 3, struct.calcsize('iii')) 50 self.assertEqual(sz * 3, sz3) 52 self.assertRaises(struct.error, struct.pack, 'iii', 3) 53 self.assertRaises(struct.error, struct.pack, 'i', 3, 3, 3) 54 self.assertRaises((TypeError, struct.error), struct.pack, 'i', 'foo') 55 self [all...] |
H A D | test_urllibnet.py | 21 def setUp(self): 24 def tearDown(self): 27 def testURLread(self): 29 self.addCleanup(urllib.request.urlcleanup) 54 def setUp(self): 56 self.addCleanup(urllib.request.urlcleanup) 59 def urlopen(self, *args, **kwargs): 68 def test_basic(self): 70 with self.urlopen(self [all...] |
H A D | test_binascii.py | 27 def setUp(self): 28 self.data = self.type2test(self.rawdata) 30 def test_exceptions(self): 32 self.assertTrue(issubclass(binascii.Error, Exception)) 33 self.assertTrue(issubclass(binascii.Incomplete, Exception)) 35 def test_functions(self): 38 self.assertTrue(hasattr(getattr(binascii, name), '__call__')) 39 self [all...] |
H A D | test_stringprep.py | 9 def test(self): 10 self.assertTrue(in_table_a1("\u0221")) 11 self.assertFalse(in_table_a1("\u0222")) 13 self.assertTrue(in_table_b1("\u00ad")) 14 self.assertFalse(in_table_b1("\u00ae")) 16 self.assertTrue(map_table_b2("\u0041"), "\u0061") 17 self.assertTrue(map_table_b2("\u0061"), "\u0061") 19 self.assertTrue(map_table_b3("\u0041"), "\u0061") 20 self.assertTrue(map_table_b3("\u0061"), "\u0061") 22 self [all...] |
H A D | test_super.py | 7 def f(self): 14 def f(self): 21 def f(self): 28 def f(self): 45 def tearDown(self): 50 def test_basics_working(self): 51 self.assertEqual(D().f(), 'ABCD') 53 def test_class_getattr_working(self): 54 self.assertEqual(D.f(D()), 'ABCD') 56 def test_subclass_no_override_working(self) [all...] |
H A D | test_list.py | 10 def test_basic(self): 11 self.assertEqual(list([]), []) 14 self.assertEqual(l0_3, l0_3_bis) 15 self.assertTrue(l0_3 is not l0_3_bis) 16 self.assertEqual(list(()), []) 17 self.assertEqual(list((0, 1, 2, 3)), [0, 1, 2, 3]) 18 self.assertEqual(list(''), []) 19 self.assertEqual(list('spam'), ['s', 'p', 'a', 'm']) 20 self.assertEqual(list(x for x in range(10) if x % 2), 38 self [all...] |
H A D | test_subclassinit.py | 6 def test_init_subclass(self): 17 self.assertFalse(A.initialized) 18 self.assertTrue(B.initialized) 20 def test_init_subclass_dict(self): 31 self.assertFalse(A.initialized) 32 self.assertTrue(B.initialized) 34 def test_init_subclass_kwargs(self): 42 self.assertEqual(B.kwargs, dict(x=3)) 44 def test_init_subclass_error(self): 49 with self [all...] |
/third_party/python/Lib/ |
H A D | _pydecimal.py | 202 trap_enabler is not set. First argument is self, second is the 205 context._raise_error(NewError, '(-x)!', self._sign) would 206 call NewError().handle(context, self._sign).) 211 def handle(self, context, *args): 250 def handle(self, context, *args): 263 def handle(self, context, *args): 279 def handle(self, context, sign, *args): 290 def handle(self, context, *args): 301 def handle(self, context, *args): 327 def handle(self, contex [all...] |
/third_party/python/Lib/test/test_tools/ |
H A D | test_pindent.py | 20 def assertFileEqual(self, fn1, fn2): 22 self.assertEqual(f1.readlines(), f2.readlines()) 24 def pindent(self, source, *args): 26 (sys.executable, self.script) + args, 30 self.assertIsNone(err) 33 def lstriplines(self, data): 36 def test_selftest(self): 37 self.maxDiff = None 40 with open(self.script, encoding='utf-8') as f: 45 rc, out, err = assert_python_ok(self [all...] |
/third_party/skia/infra/bots/recipe_modules/flavor/ |
H A D | ios.py | 13 def __init__(self, m, app_name): 14 super(iOSFlavor, self).__init__(m, app_name) 15 self.device_dirs = default.DeviceDirs( 29 def env(self): 31 'IOS_BUNDLE_ID': 'com.google.%s' % self.app_name, 32 'IOS_MOUNT_POINT': self.m.vars.workdir.join('mnt_iosdevice'), 35 def context(self): 36 return self.m.context(env=self.env) 38 def _run(self, titl [all...] |
/third_party/node/deps/v8/third_party/jinja2/ |
H A D | idtracking.py | 25 def __init__(self, parent=None, level=None): 31 self.level = level 32 self.parent = parent 33 self.refs = {} 34 self.loads = {} 35 self.stores = set() 37 def analyze_node(self, node, **kwargs): 38 visitor = RootVisitor(self) 41 def _define_ref(self, name, load=None): 42 ident = "l_%d_%s" % (self [all...] |
/third_party/node/tools/inspector_protocol/jinja2/ |
H A D | idtracking.py | 27 def __init__(self, parent=None, level=None): 33 self.level = level 34 self.parent = parent 35 self.refs = {} 36 self.loads = {} 37 self.stores = set() 39 def analyze_node(self, node, **kwargs): 40 visitor = RootVisitor(self) 43 def _define_ref(self, name, load=None): 44 ident = 'l_%d_%s' % (self [all...] |
/third_party/lz4/tests/ |
H A D | test-lz4-list.py | 19 def __init__(self, line_in): 20 self.line = line_in 24 self.frames, self.type, self.block, self.compressed, self.uncompressed, self.ratio, self.filename = splitlines 25 self [all...] |
/third_party/python/Tools/ssl/ |
H A D | multissltests.py | 163 def __init__(self, version, args): 164 self.version = version 165 self.args = args 167 self.install_dir = os.path.join( 168 os.path.join(args.base_directory, self.library.lower()), version 171 self.src_dir = os.path.join(args.base_directory, 'src') 172 self.src_file = os.path.join( 173 self.src_dir, self.src_template.format(version)) 175 self [all...] |
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/spec_tools/ |
H A D | html_printer.py | 43 def __init__(self, filename): 45 self.f = open(filename, 'w', encoding='utf-8') 46 self.f.write("""<!doctype html> 67 self.filenameTransformer = re.compile(r'[^\w]+') 68 self.fileRange = {} 69 self.fileLines = {} 70 self.backLink = namedtuple( 72 self.fileBackLinks = {} 74 self.nextAnchor = 0 77 def close(self) [all...] |
/third_party/skia/third_party/externals/jinja2/ |
H A D | idtracking.py | 25 def __init__(self, parent=None, level=None): 31 self.level = level 32 self.parent = parent 33 self.refs = {} 34 self.loads = {} 35 self.stores = set() 37 def analyze_node(self, node, **kwargs): 38 visitor = RootVisitor(self) 41 def _define_ref(self, name, load=None): 42 ident = "l_%d_%s" % (self [all...] |
/third_party/python/Lib/distutils/command/ |
H A D | build_py.py | 32 def initialize_options(self): 33 self.build_lib = None 34 self.py_modules = None 35 self.package = None 36 self.package_data = None 37 self.package_dir = None 38 self.compile = 0 39 self.optimize = 0 40 self.force = None 42 def finalize_options(self) [all...] |
/third_party/typescript/tests/ts_extra_tests/tool/ |
H A D | testcfg.py | 51 def __init__(self, path):
52 self.path = path
53 self.target_js_path = ""
58 self.declaration = data
59 self.fail = False
60 self.is_test_case = False if data is None else True
61 self.detail_result = ""
62 self.err_line = 0
63 self.abc_file_path = ""
64 self [all...] |
/third_party/python/Lib/lib2to3/pgen2/ |
H A D | pgen.py | 12 def __init__(self, filename, stream=None): 17 self.filename = filename 18 self.stream = stream 19 self.generator = tokenize.generate_tokens(stream.readline) 20 self.gettoken() # Initialize lookahead 21 self.dfas, self.startsymbol = self.parse() 24 self.first = {} # map from symbol name to set of tokens 25 self [all...] |
/third_party/mesa3d/bin/pick/ |
H A D | ui.py | 46 def __init__(self, *args, ui: 'UI', **kwargs): 48 self.ui = ui 50 def keypress(self, size: int, key: str) -> typing.Optional[str]: 54 asyncio.ensure_future(self.ui.update()) 56 self.ui.add() 68 def __init__(self, ui: 'UI', commit: 'core.Commit'): 71 self.ui = ui 72 self.commit = commit 74 async def apply(self) -> None: 75 async with self [all...] |
/third_party/python/Lib/curses/ |
H A D | textpad.py | 43 def __init__(self, win, insert_mode=False): 44 self.win = win 45 self.insert_mode = insert_mode 46 self._update_max_yx() 47 self.stripspaces = 1 48 self.lastcmd = None 51 def _update_max_yx(self): 52 maxy, maxx = self.win.getmaxyx() 53 self.maxy = maxy - 1 54 self [all...] |
/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_browser.py | 34 def test_init(self): 35 mb = self.mb 36 eq = self.assertEqual 39 self.assertIsInstance(mb.node, TreeNode) 40 self.assertIsNotNone(browser.file_open) 42 def test_settitle(self): 43 mb = self.mb 44 self.assertIn(os.path.basename(__file__), mb.top.title()) 45 self.assertEqual(mb.top.iconname(), 'Module Browser') 47 def test_rootnode(self) [all...] |
/third_party/python/Lib/test/test_importlib/ |
H A D | test_main.py | 30 def test_retrieves_version_of_self(self): 33 assert re.match(self.version_pattern, dist.version) 35 def test_for_name_does_not_exist(self): 36 with self.assertRaises(PackageNotFoundError): 39 def test_package_not_found_mentions_metadata(self): 46 with self.assertRaises(PackageNotFoundError) as ctx: 51 def test_new_style_classes(self): 52 self.assertIsInstance(Distribution, type) 58 def test_invalid_inputs_to_from_name(self, name): 59 with self [all...] |
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | descriptor_pool_test.py | 72 def testFindFileByName(self): 74 file_desc1 = self.pool.FindFileByName(name1) 75 self.assertIsInstance(file_desc1, descriptor.FileDescriptor) 76 self.assertEqual(name1, file_desc1.name) 77 self.assertEqual('google.protobuf.python.internal', file_desc1.package) 78 self.assertIn('Factory1Message', file_desc1.message_types_by_name) 81 file_desc2 = self.pool.FindFileByName(name2) 82 self.assertIsInstance(file_desc2, descriptor.FileDescriptor) 83 self.assertEqual(name2, file_desc2.name) 84 self [all...] |