Home
last modified time | relevance | path

Searched refs:hasattr (Results 1 – 25 of 1598) sorted by relevance

12345678910>>...64

/external/python/cpython2/Lib/test/
Dtest_posix.py56 @unittest.skipUnless(hasattr(posix, 'getresuid'),
64 @unittest.skipUnless(hasattr(posix, 'getresgid'),
72 @unittest.skipUnless(hasattr(posix, 'setresuid'),
80 @unittest.skipUnless(hasattr(posix, 'setresuid'),
89 @unittest.skipUnless(hasattr(posix, 'setresgid'),
97 @unittest.skipUnless(hasattr(posix, 'setresgid'),
106 @unittest.skipUnless(hasattr(posix, 'initgroups'),
131 @unittest.skipUnless(hasattr(posix, 'statvfs'),
136 @unittest.skipUnless(hasattr(posix, 'fstatvfs'),
145 @unittest.skipUnless(hasattr(posix, 'ftruncate'),
[all …]
Dtest_os.py88 @unittest.skipUnless(hasattr(os, 'tempnam'), 'test needs os.tempnam()')
103 @unittest.skipUnless(hasattr(os, 'tmpfile'), 'test needs os.tmpfile()')
153 @unittest.skipUnless(hasattr(os, 'tmpnam'), 'test needs os.tmpnam()')
195 @unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
256 @unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
423 if hasattr(os, "symlink"):
467 if hasattr(os, "symlink"):
661 if hasattr(os, f):
676 @unittest.skipUnless(hasattr(os, 'isatty'), 'test needs os.isatty()')
680 @unittest.skipUnless(hasattr(os, 'closerange'), 'test needs os.closerange()')
[all …]
Dtest_curses.py37 return unittest.skipUnless(hasattr(curses, name),
150 if hasattr(stdscr, 'immedok'):
186 if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"):
193 if hasattr(stdscr, 'chgat'):
203 if hasattr(stdscr, 'resize'):
205 if hasattr(stdscr, 'enclose'):
226 if hasattr(curses, 'filter'):
228 if hasattr(curses, 'getsyx'):
253 if hasattr(curses, 'setsyx'):
259 if hasattr(curses, 'typeahead'):
[all …]
/external/tensorflow/tensorflow/python/util/
Dtf_decorator.py91 if hasattr(target, '__name__'):
93 if hasattr(target, '__qualname__'):
95 if hasattr(target, '__module__'):
97 if hasattr(target, '__dict__'):
102 if hasattr(target, '__doc__'):
121 hasattr(obj, '_tf_decorator') and
185 if hasattr(innermost_decorator, '__func__'):
187 elif hasattr(innermost_decorator, 'im_func'):
220 if not hasattr(decorators[-1], 'decorated_target'):
242 if hasattr(target, '__name__'):
[all …]
Dtf_export.py119 if not hasattr(symbol, '__dict__'):
179 if not hasattr(symbol, '__dict__'):
205 if not hasattr(symbol, '__dict__'):
230 if hasattr(module, tensorflow_constants_attr_v1):
232 if hasattr(module, estimator_constants_attr_v1):
251 if hasattr(module, tensorflow_constants_attr):
253 if hasattr(module, estimator_constants_attr):
382 if not hasattr(module, api_constants_attr):
388 if not hasattr(module, api_constants_attr_v1):
/external/tensorflow/tensorflow/python/autograph/pyct/
Dinspect_utils.py64 if not (hasattr(f, '__name__') and hasattr(f, '__code__')):
76 if not hasattr(f, '_fields'):
116 and hasattr(cls.__class__, '__call__')
134 if hasattr(obj, '__module__'):
142 if hasattr(m, '__file__') and m.__file__ == obj_file:
247 if hasattr(m, '__func__'):
249 if hasattr(m, 'im_func'):
259 if hasattr(superclass, m.__name__):
263 elif hasattr(m, '__self__') and m.__self__ == owner_class:
294 if (not hasattr(m, '__name__') and hasattr(m, '__class__') and
[all …]
/external/python/cpython2/Lib/encodings/
D__init__.py64 if hasattr(__builtin__, "unicode") and isinstance(encoding, unicode):
126 if not hasattr(entry[0], '__call__') or \
127 not hasattr(entry[1], '__call__') or \
128 (entry[2] is not None and not hasattr(entry[2], '__call__')) or \
129 (entry[3] is not None and not hasattr(entry[3], '__call__')) or \
130 (len(entry) > 4 and entry[4] is not None and not hasattr(entry[4], '__call__')) or \
131 (len(entry) > 5 and entry[5] is not None and not hasattr(entry[5], '__call__')):
/external/chromium-trace/catapult/third_party/pyserial/serial/
Dserialposix.py241 TIOCMGET = hasattr(TERMIOS, 'TIOCMGET') and TERMIOS.TIOCMGET or 0x5415
242 TIOCMBIS = hasattr(TERMIOS, 'TIOCMBIS') and TERMIOS.TIOCMBIS or 0x5416
243 TIOCMBIC = hasattr(TERMIOS, 'TIOCMBIC') and TERMIOS.TIOCMBIC or 0x5417
244 TIOCMSET = hasattr(TERMIOS, 'TIOCMSET') and TERMIOS.TIOCMSET or 0x5418
247 TIOCM_DTR = hasattr(TERMIOS, 'TIOCM_DTR') and TERMIOS.TIOCM_DTR or 0x002
248 TIOCM_RTS = hasattr(TERMIOS, 'TIOCM_RTS') and TERMIOS.TIOCM_RTS or 0x004
252 TIOCM_CTS = hasattr(TERMIOS, 'TIOCM_CTS') and TERMIOS.TIOCM_CTS or 0x020
253 TIOCM_CAR = hasattr(TERMIOS, 'TIOCM_CAR') and TERMIOS.TIOCM_CAR or 0x040
254 TIOCM_RNG = hasattr(TERMIOS, 'TIOCM_RNG') and TERMIOS.TIOCM_RNG or 0x080
255 TIOCM_DSR = hasattr(TERMIOS, 'TIOCM_DSR') and TERMIOS.TIOCM_DSR or 0x100
[all …]
/external/python/cpython3/Lib/test/
Dtest_posix.py29 if not hasattr(posix, 'sched_getscheduler'):
73 @unittest.skipUnless(hasattr(posix, 'getresuid'),
81 @unittest.skipUnless(hasattr(posix, 'getresgid'),
89 @unittest.skipUnless(hasattr(posix, 'setresuid'),
97 @unittest.skipUnless(hasattr(posix, 'setresuid'),
106 @unittest.skipUnless(hasattr(posix, 'setresgid'),
114 @unittest.skipUnless(hasattr(posix, 'setresgid'),
123 @unittest.skipUnless(hasattr(posix, 'initgroups'),
148 @unittest.skipUnless(hasattr(posix, 'statvfs'),
153 @unittest.skipUnless(hasattr(posix, 'fstatvfs'),
[all …]
Dtest_signal.py176 if hasattr(os, 'set_blocking'):
386 @unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
404 @unittest.skipUnless(hasattr(socket, 'socketpair'), 'need socket.socketpair')
788 @unittest.skipUnless(hasattr(signal, 'sigpending'),
793 @unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
795 @unittest.skipUnless(hasattr(signal, 'sigpending'),
824 @unittest.skipUnless(hasattr(signal, 'pthread_kill'),
849 @unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
895 @unittest.skipUnless(hasattr(signal, 'sigwait'),
907 @unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
[all …]
/external/python/cpython3/Lib/test/eintrdata/
Deintr_tester.py38 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
78 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
98 @unittest.skipUnless(hasattr(os, 'wait3'), 'requires wait3()')
111 @unittest.skipUnless(hasattr(os, 'wait4'), 'requires wait4()')
183 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
187 @unittest.skipUnless(hasattr(socket, 'socketpair'), 'needs socketpair()')
226 @unittest.skipUnless(hasattr(socket.socket, 'recvmsg'), 'needs recvmsg()')
282 @unittest.skipUnless(hasattr(socket.socket, 'sendmsg'), 'needs sendmsg()')
315 @unittest.skipUnless(hasattr(os, 'mkfifo'), 'needs mkfifo()')
366 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
[all …]
/external/fonttools/Lib/fontTools/subset/
Dcff.py17 assert not hasattr(clazz, method.__name__), \
76 if hasattr(font, 'FDArray') and font.FDArray is not None:
128 if hasattr(font, "FDSelect"):
185 if hasattr(self, 'width'):
214 if subrs and not hasattr(subrs, "_used"):
259 old_hints = charString._hints if hasattr(charString, '_hints') else None
385 if hasattr(charString, '_desubroutinized'):
433 if hasattr(cs, '_desubroutinized'):
443 if not hasattr(cs, '_desubroutinized'):
455 if hasattr(font, "FDSelect"):
[all …]
/external/python/cpython3/Lib/test/test_importlib/import_/
Dtest_fromlist.py66 self.assertFalse(hasattr(module, 'non_existent'))
74 self.assertTrue(hasattr(module, 'module'))
82 self.assertFalse(hasattr(module, 'non_existent'))
110 self.assertTrue(hasattr(module, 'module'))
128 self.assertTrue(hasattr(module, 'module1'))
129 self.assertTrue(hasattr(module, 'module2'))
139 self.assertFalse(hasattr(module, 'non_existent'))
147 self.assertFalse(hasattr(module, '*'))
/external/python/cpython3/Lib/test/support/
Dsocket_helper.py92 if hasattr(socket, 'SO_REUSEADDR'):
97 if hasattr(socket, 'SO_REUSEPORT'):
108 if hasattr(socket, 'SO_EXCLUSIVEADDRUSE'):
145 if not hasattr(socket, 'AF_UNIX'):
172 if hasattr(errno, 'ENETUNREACH'):
175 if hasattr(errno, 'EADDRNOTAVAIL'):
179 if hasattr(errno, 'EHOSTUNREACH'):
/external/python/cpython3/Lib/test/test_importlib/source/
Dtest_path_hook.py18 self.assertTrue(hasattr(self.path_hook()(mapping['.root']),
23 self.assertTrue(hasattr(self.path_hook()(mapping['.root']),
28 self.assertTrue(hasattr(self.path_hook()(''), 'find_spec'))
32 self.assertTrue(hasattr(self.path_hook()(''), 'find_module'))
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_protocols.py16 self.assertFalse(hasattr(p, '__dict__'))
27 self.assertFalse(hasattr(p, '__dict__'))
38 self.assertFalse(hasattr(p, '__dict__'))
47 self.assertFalse(hasattr(dp, '__dict__'))
57 self.assertFalse(hasattr(sp, '__dict__'))
/external/python/cpython3/Lib/
Ddis.py56 if hasattr(x, '__func__'):
59 if hasattr(x, '__code__'): # ...a function, or
61 elif hasattr(x, 'gi_code'): #...a generator object, or
63 elif hasattr(x, 'ag_code'): #...an asynchronous generator object, or
65 elif hasattr(x, 'cr_code'): #...a coroutine.
68 if hasattr(x, '__dict__'): # Class or module
78 elif hasattr(x, 'co_code'): # Code object
131 if hasattr(x, '__func__'):
134 if hasattr(x, '__code__'): # ...a function, or
136 elif hasattr(x, 'gi_code'): #...a generator object, or
[all …]
Dsocket.py344 if hasattr(os, 'sendfile'):
367 if hasattr(selectors, 'PollSelector'):
408 if total_sent > 0 and hasattr(file, 'seek'):
448 if total_sent > 0 and hasattr(file, 'seek'):
547 if hasattr(_socket.socket, "sendmsg"):
559 if hasattr(_socket.socket, "recvmsg"):
581 if hasattr(_socket.socket, "share"):
591 if hasattr(_socket, "socketpair"):
856 or not hasattr(_socket, 'IPPROTO_IPV6') \
857 or not hasattr(_socket, 'IPV6_V6ONLY'):
[all …]
/external/tensorflow/tensorflow/python/autograph/impl/
Dconversion.py49 not hasattr(sys.modules[module_name], entity_name)):
107 if (hasattr(o, '__module__') and
108 hasattr(o.__module__, '_IS_TENSORFLOW_PLUGIN')):
143 if hasattr(m, '__name__'):
155 if hasattr(o, '__code__') and tf_inspect.isgeneratorfunction(o):
160 hasattr(o, '__call__')):
/external/fonttools/Lib/fontTools/ttLib/tables/
DotBase.py102 if not hasattr(self, "table"):
246 if hasattr(item, "getCountData"):
248 elif hasattr(item, "getData"):
262 if hasattr(item, "getData"):
301 isExtension = hasattr(self, "Extension")
307 dontShare = hasattr(self, 'DontShare')
315 if hasattr(item, "getCountData"):
317 elif hasattr(item, "getData"):
338 isExtension = hasattr(self, "Extension")
348 if hasattr(self, "sortCoverageLast"):
[all …]
/external/libchrome/third_party/markupsafe/
D__init__.py69 if hasattr(base, '__html__'):
79 if isinstance(other, string_types) or hasattr(other, '__html__'):
84 if hasattr(other, '__html__') or isinstance(other, string_types):
184 if hasattr(text_type, 'partition'):
193 if hasattr(text_type, 'format'):
197 if hasattr(text_type, '__getslice__'):
206 if hasattr(value, '__html__') or isinstance(value, string_types):
/external/fonttools/Lib/fontTools/cffLib/
D__init__.py120 if hasattr(nameOrIndex, "__index__"):
186 if not hasattr(topDict, "charset") or topDict.charset is None:
230 if not hasattr(self, "major"):
232 if not hasattr(self, "minor"):
237 if not hasattr(self, "offSize"):
240 if not hasattr(self, "hdrSize"):
242 if not hasattr(self, "GlobalSubrs"):
244 if not hasattr(self, "fontNames"):
252 if not hasattr(self, "hdrSize"):
254 if not hasattr(self, "GlobalSubrs"):
[all …]
/external/python/httplib2/tests/
Dtest_https.py75 not hasattr(tests.ssl_context(), "minimum_version"),
81 expect_success = hasattr(ssl.SSLContext(), 'minimum_version')
92 not hasattr(tests.ssl_context(), "maximum_version"),
99 expect_success = hasattr(ssl.SSLContext(), 'maximum_version')
110 not hasattr(tests.ssl_context(), "minimum_version"),
130 not hasattr(tests.ssl_context(), "maximum_version"),
189 not hasattr(tests.ssl_context(), "set_servername_callback"),
/external/scapy/scapy/
Dbase_classes.py30 all(hasattr(i, "__int__") for i in values)):
104 if hasattr(other, "parsed"):
110 if hasattr(other, "parsed"):
172 if hasattr(b,"fields_desc"):
197 for cls in newcls.__mro__ if hasattr(cls, "__slots__")
201 if hasattr(newcls, "aliastypes"):
206 if hasattr(newcls,"register_variant"):
209 if hasattr(f, "register_owner"):
/external/python/pybind11/tests/
Dtest_builtin_casters.py20 if hasattr(m, "has_u8string"):
30 if hasattr(m, "bad_utf32_string"):
33 if hasattr(m, "bad_wchar_string"):
36 if hasattr(m, "has_u8string"):
45 if hasattr(m, "has_u8string"):
108 if hasattr(m, "has_u8string"):
141 @pytest.mark.skipif(not hasattr(m, "has_string_view"), reason="no <string_view>")
148 if hasattr(m, "has_u8string"):
155 if hasattr(m, "has_u8string"):
172 if hasattr(m, "has_u8string"):
[all …]

12345678910>>...64