def test_constructor_with_many_point_sources(): # Test with 200 point sources many_p_sources = [_get_point_source("pts_source%i" %x) for x in range(200)] m = Model(*many_p_sources) assert m.get_number_of_point_sources()==200
def test_constructor_with_many_point_sources(): # Test with 200 point sources many_p_sources = map(lambda x: _get_point_source("pts_source%i" % x), range(200)) m = Model(*many_p_sources) assert m.get_number_of_point_sources() == 200
def test_constructor_with_mix(): many_p_sources = [_get_point_source("pts_source%i" % x) for x in range(200)] many_e_sources = [_get_extended_source("ext_source%i" % x) for x in range(200)] many_part_sources = [_get_particle_source("part_source%i" % x) for x in range(200)] all_sources = [] all_sources.extend(many_p_sources) all_sources.extend(many_e_sources) all_sources.extend(many_part_sources) m = Model(*all_sources) assert m.get_number_of_point_sources() == 200 assert m.get_number_of_extended_sources() == 200 assert m.get_number_of_particle_sources() == 200