Singleton Module

class mtf.utils.Singleton.Singleton

Singleton that keep single instance for single set of arguments. E.g.: assert Singleton(‘spam’) is not Singleton(‘eggs’) assert Singleton(‘spam’) is Singleton(‘spam’)

__init__(name, bases, dct)
__new__(**kwargs)
mro()

Return a type’s method resolution order.

class mtf.utils.Singleton.AbstractSingleton
__init__(name, bases, dct)
static __new__(mcls, name, bases, namespace, **kwargs)
mro()

Return a type’s method resolution order.

register(subclass)

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.