attest icon indicating copy to clipboard operation
attest copied to clipboard

Generate tests from list of contexts

Open dag opened this issue 13 years ago • 1 comments

Similar to #105 but generative. Each context represents a call of each test function in the collection rather than nested contexts.

Thanks ronny.

dag avatar May 09 '11 21:05 dag

The #105 equivalent would thus be something like,

db = Tests(foreach=[memorydb, filedb])

@db.test
def dbtest(conn):
    assert some_condition(using=conn)

The benefit becomes more obvious when the list of contexts is dynamic or large.

dag avatar May 10 '11 10:05 dag