src/w/a/waferslim-1.0.2/waferslim/examples/system_under_test.py waferslim(Download)
class _PersonInterface(object):
''' Example class to use as the system under test to show method redirection'''
def __init__(self):
self._people = []
class SlimDriverWithSutMethod(object):
''' Fixture class to name in fitnesse table, with sut() method '''
def init(self):
''' a simple method to call directly from fitnesse table '''
self._sut = _PersonInterface()
class SlimDriverWithSutField(object):
''' Alternative fixture class to name in fitnesse table, with sut field '''
def init(self):
''' a simple method to call directly from fitnesse table: sets up the sut field'''
self.sut = _PersonInterface()
class SlimDriverWithSutProperty(object):
src/p/y/Pyro4-4.17/examples/robots/remote.py Pyro4(Download)
class GameServer(object):
def __init__(self, engine):
self.engine=engine
def register(self, name, observer):
robot=self.engine.signup_robot(name, observer)
self._pyroDaemon.register(robot) # make the robot a pyro object
return robot
class RemoteBot(object):
class LocalGameObserver(object):
def __init__(self, name):
self.name=name
self.robot=None
self._pyroOneway=set() # remote observers have this
class GameObserver(object):
def world_update(self, iteration, world, robotdata):
pass
def start(self):
print("Battle starts!")
src/p/y/python-inject-HEAD/examples/simple.py python-inject(Download)
class Memcached(object):
"""Dummy memcached backend, always returns None."""
def __init__(self, host, port):
print('Connected memcached to %s:%s' % (host, port))
class Redis(object):
"""Redis backend, always returns a new User instance for any key."""
def __init__(self, host, port):
print('Connected redis to %s:%s' % (host, port))
def get(self, key):
return User("Ivan Korobkov", "ivan.korobkov@gmail.com")
class MailService(object):
class User(object):
"""Example model."""
# Both Redis and Memcached are injected as class attributes
src/s/y/sympy-0.7.2/examples/advanced/relativity.py sympy(Download)
class MT(object):
def __init__(self,m):
self.gdd=m
self.guu=m.inv()
class G(object):
def __init__(self,g,x):
self.g = g
self.x = x
class Riemann(object):
def __init__(self,G,x):
self.G = G
self.x = x
class Ricci(object):
def __init__(self,R,x):
self.R = R
self.x = x
self.g = R.G.g
src/m/u/Muntjac-1.1.1/muntjac/demo/sampler/Feature.py Muntjac(Download)
class Feature(object):
"""Represents one feature or sample, with associated example.
"""
PROPERTY_ICON = 'Icon'
+ ' server, or tell the administrator to do so!')
_MUTEX = object()
def __init__(self):
class Version(object):
OLD = None
BUILD = None
V62 = None
src/m/a/matplotlib-HEAD/examples/units/basic_units.py matplotlib(Download)
class ProxyDelegate(object):
def __init__(self, fn_name, proxy_type):
self.proxy_type = proxy_type
self.fn_name = fn_name
def __get__(self, obj, objtype=None):
class PassThroughProxy(object):
def __init__(self, fn_name, obj):
self.fn_name = fn_name
self.target = obj.proxy_target
def __call__(self, *args):
class TaggedValue (object):
__metaclass__ = TaggedValueMeta
_proxies = {'__add__':ConvertAllProxy,
'__sub__':ConvertAllProxy,
class IteratorProxy(object):
def __init__(self, iter, unit):
self.iter = iter
self.unit = unit
def __next__(self):
class BasicUnit(object):
def __init__(self, name, fullname=None):
self.name = name
if fullname is None: fullname = name
self.fullname = fullname
src/g/a/gaeframework-2.0.10/google_appengine/lib/webob/docs/wiki-example-code/example.py gaeframework(Download)
class WikiApp(object):
view_template = VIEW_TEMPLATE
edit_template = EDIT_TEMPLATE
class Page(object):
def __init__(self, filename):
self.filename = filename
@property
src/g/a/gaesdk-python-HEAD/lib/PyAMF/doc/architecture/examples/class-mapping/alias-decorator.py gaesdk-python(Download)
class RemoteClass(object):
def __init__(self, alias):
self.alias = alias
def __call__(self, klass):
src/g/a/gaesdk-python-HEAD/lib/PyAMF/doc/architecture/examples/attribute-control/synonym.py gaesdk-python(Download)
class UserProfile(object):
class __amf__:
synonym = {'public': '_public'}
pyamf.register_class(Person, 'com.acme.app.UserProfile')src/g/a/gaesdk-python-HEAD/lib/PyAMF/doc/architecture/examples/attribute-control/static-attr.py gaesdk-python(Download)
class Person(object):
class __amf__:
static = ('gender', 'dob')
pyamf.register_class(Person, 'com.acme.app.Person')Previous 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 Next