/third_party/node/tools/gyp/pylib/gyp/generator/ |
H A D | android.py | 108 def __init__(self, android_top_dir): 109 self.android_top_dir = android_top_dir 112 self, 139 self.fp = open(output_filename, "w") 141 self.fp.write(header) 143 self.qualified_target = qualified_target 144 self.relative_target = relative_target 145 self.path = base_path 146 self.target = spec["target_name"] 147 self [all...] |
/third_party/python/Lib/test/test_json/ |
H A D | test_decode.py | 9 def test_decimal(self): 10 rval = self.loads('1.1', parse_float=decimal.Decimal) 11 self.assertTrue(isinstance(rval, decimal.Decimal)) 12 self.assertEqual(rval, decimal.Decimal('1.1')) 14 def test_float(self): 15 rval = self.loads('1', parse_int=float) 16 self.assertTrue(isinstance(rval, float)) 17 self.assertEqual(rval, 1.0) 19 def test_empty_objects(self): 20 self [all...] |
/third_party/node/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ |
H A D | android.py | 108 def __init__(self, android_top_dir): 109 self.android_top_dir = android_top_dir 112 self, 139 self.fp = open(output_filename, "w") 141 self.fp.write(header) 143 self.qualified_target = qualified_target 144 self.relative_target = relative_target 145 self.path = base_path 146 self.target = spec["target_name"] 147 self [all...] |
/third_party/alsa-lib/modules/mixer/simple/python/ |
H A D | common.py | 14 def __init__(self, mixer, name, index, weight): 15 InternalMElement.__init__(self, mixer, name, index, weight) 16 self.channels = 0 17 self.min = [0, 0] 18 self.max = [0, 0] 20 def opsIsChannel(self, dir, chn): 21 return chn >= 0 and chn < self.channels 23 def opsGetRange(self, dir): 24 return (0, self.min[dir], self [all...] |
/third_party/python/Lib/multiprocessing/ |
H A D | shared_memory.py | 75 def __init__(self, name=None, create=False, size=0): 79 self._flags = _O_CREX | os.O_RDWR 82 if name is None and not self._flags & os.O_EXCL: 93 self._fd = _posixshmem.shm_open( 95 self._flags, 96 mode=self._mode 100 self._name = name 103 name = "/" + name if self._prepend_leading_slash else name 104 self._fd = _posixshmem.shm_open( 106 self [all...] |
/third_party/python/Lib/test/ |
H A D | test_property.py | 21 def __init__(self): 22 self._spam = 5 25 def spam(self): 27 return self._spam 30 def spam(self, value): 31 self._spam = value 34 def spam(self): 35 del self._spam 40 def spam(self): 42 raise PropertyGet(self [all...] |
H A D | test_strptime.py | 17 def test_basic(self): 18 self.assertEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME)) 28 def setUp(self): 30 self.time_tuple = time.localtime() 31 self.LT_ins = _strptime.LocaleTime() 33 def compare_against_time(self, testing, directive, tuple_position, 39 strftime_output = time.strftime(directive, self.time_tuple).lower() 40 comparison = testing[self.time_tuple[tuple_position]] 41 self.assertIn(strftime_output, testing, 43 self [all...] |
H A D | test_abc.py | 18 def test_abstractproperty_basics(self): 20 def foo(self): pass 21 self.assertTrue(foo.__isabstractmethod__) 22 def bar(self): pass 23 self.assertFalse(hasattr(bar, "__isabstractmethod__")) 27 def foo(self): return 3 28 self.assertRaises(TypeError, C) 31 def foo(self): return super().foo 32 self.assertEqual(D().foo, 3) 33 self [all...] |
H A D | test_compare.py | 12 def __repr__(self): 16 def __init__(self, arg): 17 self.arg = arg 19 def __repr__(self): 20 return '<Cmp %s>' % self.arg 22 def __eq__(self, other): 23 return self.arg == other 29 def test_comparisons(self): 30 for a in self.candidates: 31 for b in self [all...] |
H A D | multibytecodec_support.py | 26 def setUp(self): 27 if self.codec is None: 28 self.codec = codecs.lookup(self.encoding) 29 self.encode = self.codec.encode 30 self.decode = self.codec.decode 31 self.reader = self [all...] |
H A D | test_multibytecodec.py | 35 def test_nullcoding(self): 37 self.assertEqual(b''.decode(enc), '') 38 self.assertEqual(str(b'', enc), '') 39 self.assertEqual(''.encode(enc), b'') 41 def test_str_decode(self): 43 self.assertEqual('abcd'.encode(enc), b'abcd') 45 def test_errorcallback_longindex(self): 49 self.assertRaises(IndexError, dec, 52 def test_errorcallback_custom_ignore(self): 57 self [all...] |
/third_party/python/Tools/demo/ |
H A D | redemo.py | 10 def __init__(self, master): 11 self.master = master 13 self.promptdisplay = Label(self.master, anchor=W, 15 self.promptdisplay.pack(side=TOP, fill=X) 17 self.regexdisplay = Entry(self.master) 18 self.regexdisplay.pack(fill=X) 19 self.regexdisplay.focus_set() 21 self [all...] |
/third_party/python/Lib/idlelib/ |
H A D | codecontext.py | 11 For EditorWindows, <<toggle-code-context>> is bound to CodeContext(self). 49 def __init__(self, editwin): 53 self.text is the editor window text widget. 55 self.context displays the code context text above the editor text. 57 self.topvisible is the number of the top text line displayed. 58 self.info is a list of (line number, indent level, line text, 60 self.info[0] is initialized with a 'dummy' line which 63 self.t1 and self.t2 are two timer events on the editor text widget to 66 self [all...] |
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/ |
H A D | generator.py | 116 def __init__(self, msg=None): 117 full_msg = 'Missing generator options object self.genOpts' 126 def __init__(self, msg=None): 127 full_msg = 'Missing Registry object self.registry' 136 def __init__(self, msg=None): 137 full_msg = 'Missing Conventions object self.genOpts.conventions' 149 def __init__(self, 224 self.conventions = conventions 228 self.filename = filename 231 self [all...] |
H A D | reg.py | 201 def __init__(self, elem): 202 self.required = False 206 self.declared = False 209 self.elem = elem 212 def resetState(self): 215 self.required = False 216 self.declared = False 218 def compareKeys(self, info, key, required = False): 219 """Return True if self.elem and info.elem have the same attribute 224 if required and key not in self [all...] |
/third_party/vulkan-headers/registry/ |
H A D | generator.py | 116 def __init__(self, msg=None): 117 full_msg = 'Missing generator options object self.genOpts' 126 def __init__(self, msg=None): 127 full_msg = 'Missing Registry object self.registry' 136 def __init__(self, msg=None): 137 full_msg = 'Missing Conventions object self.genOpts.conventions' 149 def __init__(self, 224 self.conventions = conventions 228 self.filename = filename 231 self [all...] |
H A D | reg.py | 201 def __init__(self, elem): 202 self.required = False 206 self.declared = False 209 self.elem = elem 212 def resetState(self): 215 self.required = False 216 self.declared = False 218 def compareKeys(self, info, key, required = False): 219 """Return True if self.elem and info.elem have the same attribute 224 if required and key not in self [all...] |
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | reflection_test.py | 87 def __init__(self, bytes): 88 self._bytes = bytes 89 self._pos = 0 91 def ReadVarint(self): 92 result, self._pos = decoder._DecodeVarint(self._bytes, self._pos) 100 def ReadSInt64(self): 101 return wire_format.ZigZagDecode(self.ReadVarint()) 105 def ReadFieldNumberAndWireType(self) [all...] |
/third_party/python/Lib/test/test_peg_generator/ |
H A D | test_first_sets.py | 15 def calculate_first_sets(self, grammar_source: str) -> Dict[str, Set[str]]: 19 def test_alternatives(self) -> None: 26 self.assertEqual( 27 self.calculate_first_sets(grammar), 36 def test_optionals(self) -> None: 41 self.assertEqual( 42 self.calculate_first_sets(grammar), 49 def test_repeat_with_separator(self) -> None: 54 self.assertEqual( 55 self [all...] |
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/spec_tools/ |
H A D | entity_db.py | 35 def makeRegistry(self): 43 def getNamePrefix(self): 51 def getPlatformRequires(self): 68 def getSystemTypes(self): 77 def getGeneratedDirs(self): 91 def populateMacros(self): 92 """Perform API-specific calls, if any, to self.addMacro() and self.addMacros(). 95 self.addMacros(..., ..., [..., "flags"]), 103 def populateEntities(self) [all...] |
/third_party/skia/infra/bots/recipe_modules/flavor/ |
H A D | android.py | 17 def __init__(self, m, app_name): 18 super(AndroidFlavor, self).__init__(m, app_name) 19 self._ever_ran_adb = False 20 self.ADB_BINARY = '/usr/bin/adb.1.0.35' 21 self.ADB_PUB_KEY = '/home/chrome-bot/.android/adbkey' 22 if 'skia' not in self.m.vars.swarming_bot_id: 23 self.ADB_BINARY = '/opt/infra-android/tools/adb' 24 self.ADB_PUB_KEY = ('/home/chrome-bot/.android/' 29 self.device_dirs = default.DeviceDirs( 44 self [all...] |
/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_run.py | 17 def test_print_exception_unhashable(self): 19 def __eq__(self, other): 36 self.assertEqual(11, len(tb)) 37 self.assertIn('UnhashableException: ex2', tb[3]) 38 self.assertIn('UnhashableException: ex1', tb[10]) 48 def test_get_message(self): 49 for code, exc, msg in self.data: 50 with self.subTest(code=code): 57 self.assertEqual(actual, expect) 61 def test_get_multiple_message(self, moc [all...] |
/third_party/python/Lib/http/ |
H A D | server.py | 134 def server_bind(self): 136 socketserver.TCPServer.server_bind(self) 137 host, port = self.server_address[:2] 138 self.server_name = socket.getfqdn(host) 139 self.server_port = port 267 def parse_request(self): 270 The request should be stored in self.raw_requestline; the results 271 are in self.command, self.path, self [all...] |
/third_party/python/Lib/test/test_importlib/extension/ |
H A D | test_loader.py | 20 def setUp(self): 21 if not self.machinery.EXTENSION_SUFFIXES: 27 self.loader = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name, 30 def load_module(self, fullname): 33 return self.loader.load_module(fullname) 35 def test_load_module_API(self): 39 self.loader.load_module() 40 self.loader.load_module(None) 41 with self [all...] |
/third_party/googletest/googlemock/scripts/generator/cpp/ |
H A D | ast.py | 102 __contains__ = lambda self: False 103 keys = values = items = iterkeys = itervalues = iteritems = lambda self: () 110 def __init__(self, start, end): 111 self.start = start 112 self.end = end 114 def IsDeclaration(self): 118 def IsDefinition(self): 122 def IsExportable(self): 126 def Requires(self, node): 130 def XXX__str__(self) [all...] |