def test_set_molecule_meta_molecule(prior, meta, expected): """ Test for :func:`SetMoleculeMeta.run_molecule` . """ molecule = Molecule() molecule.meta = copy.copy(prior) processor = SetMoleculeMeta(**meta) processor.run_molecule(molecule) assert not are_different(molecule.meta, expected)
def test_set_molecule_meta_system(priors, meta, expected): """ Test for :func:`SetMoleculeMeta.run_system` . """ system = System() for prior in priors: molecule = Molecule() molecule.meta = copy.copy(prior) system.add_molecule(molecule) processor = SetMoleculeMeta(**meta) processor.run_system(system) for molecule, expectation in zip(system.molecules, expected): assert not are_different(molecule.meta, expectation)