def test_clear_simulations(): experiment = Experiment() experiment.add_simulations([simulation, simulation, simulation]) assert experiment.clear_simulations() assert experiment.get_simulations() == [] assert not experiment.clear_simulations() assert experiment.get_simulations() == []
def test_add_simulations(): experiment = Experiment() experiment.add_simulations([simulation, simulation]) assert experiment.get_simulations() == [simulation, simulation] experiment.add_simulations(simulation) assert experiment.get_simulations() == [simulation, simulation, simulation] with pytest.raises(Exception): experiment.add_simulations(None)
def test_add_simulations(): experiment = Experiment() experiment.add_simulations([simulation, simulation]) assert experiment.get_simulations() == [simulation, simulation] experiment.add_simulations(simulation) assert experiment.get_simulations() == [simulation, simulation, simulation]