Ejemplo n.º 1
0
def test_reaction_from_cols(cols, volume, reagents):
    rxn = Reaction.from_cols(cols)

    assert len(rxn) == len(reagents)
    assert rxn.volume == volume

    for name, expected in reagents.items():
        volume, stock_conc, master_mix = expected
        if volume != ...:     assert rxn[name].volume == volume
        if stock_conc != ...: assert rxn[name].stock_conc == stock_conc
        if master_mix != ...: assert rxn[name].master_mix == master_mix
Ejemplo n.º 2
0
def test_reaction_from_cols_raises(cols, err):
    with pytest.raises(UsageError, match=err):
        Reaction.from_cols(cols)