attest
attest copied to clipboard
Generate tests from list of contexts
Similar to #105 but generative. Each context represents a call of each test function in the collection rather than nested contexts.
Thanks ronny.
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.