Skip to content

best way to implement parametrized tests #120

@gabrielelanaro

Description

@gabrielelanaro

There is a preferred way to run parametrized texts?

For example I'm testing a scientific code on a series of molecules, something like:

def calc_energy(molecule, expected_energy):
      ....

I've tried to implement a context as a generator, something like:

def generate_mol():
     # extracting molecule objects from files...
     for mol,en in zip(molecules, energies):
           yield mol, en

But, of course this is not working because this is not a context as intended.

I was looking mainly for suggestions (or plans for a specific support in attest) on how to handle these cases of testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions