OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
mock
/
mock
/
tests
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/08/2016 10:18:36 AM
rwxr-xr-x
📄
__init__.py
146 bytes
06/08/2016 10:18:36 AM
rw-r--r--
📄
__main__.py
623 bytes
06/08/2016 10:18:36 AM
rw-r--r--
📄
support.py
552 bytes
06/08/2016 10:18:36 AM
rw-r--r--
📄
testcallable.py
4.33 KB
06/08/2016 10:18:36 AM
rw-r--r--
📄
testhelpers.py
28.02 KB
06/08/2016 10:18:36 AM
rw-r--r--
📄
testmagicmethods.py
16 KB
06/08/2016 10:18:36 AM
rw-r--r--
📄
testmock.py
49.29 KB
06/08/2016 10:18:36 AM
rw-r--r--
📄
testpatch.py
55.03 KB
06/08/2016 10:18:36 AM
rw-r--r--
📄
testsentinel.py
976 bytes
06/08/2016 10:18:36 AM
rw-r--r--
📄
testwith.py
10.34 KB
06/08/2016 10:18:36 AM
rw-r--r--
Editing: support.py
Close
import sys info = sys.version_info import unittest2 try: callable = callable except NameError: def callable(obj): return hasattr(obj, '__call__') with_available = sys.version_info[:2] >= (2, 5) def is_instance(obj, klass): """Version of is_instance that doesn't access __class__""" return issubclass(type(obj), klass) class SomeClass(object): class_attribute = None def wibble(self): pass class X(object): pass try: next = next except NameError: def next(obj): return obj.next()