Package gavo :: Package helpers :: Module testhelpers :: Class SamplesBasedAutoTest
[frames] | no frames]

Type SamplesBasedAutoTest

source code

object --+    
         |    
      type --+
             |
            SamplesBasedAutoTest

A metaclass that builds tests out of a samples attribute of a class.

To use this, give the class a samples attribute containing a sequence of anything, and a _runTest(sample) method receiving one item of that sequence.

The metaclass will create one test<n> method for each sample.

Instance Methods

Inherited from type: __call__, __delattr__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __init__, __instancecheck__, __le__, __lt__, __ne__, __repr__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Static Methods
a new object with type S, a subtype of T
__new__(cls, name, bases, dict) source code
Properties

Inherited from type: __abstractmethods__, __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details

__new__(cls, name, bases, dict)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)