Ejemplo n.º 1
0
 def test_clusters_all(self):
     """Calling clusters with other should return GCl+OCl+*Ass+Cl+N."""
     objs = data.clusters(other=True)
     assert objs[objs['type'] == 'GCl']['name'].size > 0
     assert objs[objs['type'] == 'OCl']['name'].size > 0
     assert objs[objs['type'] == '*Ass']['name'].size > 0
     assert objs[objs['type'] == 'Cl+N']['name'].size > 0
Ejemplo n.º 2
0
 def test_clusters_default(self, extra_ids):
     """Calling clusters with defaults should return GCl+OCl."""
     objs = data.clusters(extra_ids=extra_ids)
     assert objs[objs['type'] == 'GCl']['name'].size > 0
     assert objs[objs['type'] == 'OCl']['name'].size > 0
     assert objs[objs['type'] == '*Ass']['name'].size == 0
     if extra_ids:
         assert 'identifiers' in objs.columns.values.tolist()
     else:
         assert 'identifiers' not in objs.columns.values.tolist()
Ejemplo n.º 3
0
 def test_clusters_ocl_only(self):
     """Calling clusters without globular should return OCl."""
     objs = data.clusters(globular=False)
     assert objs[objs['type'] == 'GCl']['name'].size == 0
     assert objs[objs['type'] == 'OCl']['name'].size > 0
     assert objs[objs['type'] == '*Ass']['name'].size == 0
Ejemplo n.º 4
0
 def test_clusters_gcl_only(self):
     """Calling clusters without open should return GCl."""
     objs = data.clusters(open=False)
     assert objs[objs['type'] == 'GCl']['name'].size > 0
     assert objs[objs['type'] == 'OCl']['name'].size == 0
     assert objs[objs['type'] == '*Ass']['name'].size == 0
Ejemplo n.º 5
0
 def test_clusters_none(self):
     """Calling clusters with all parameters set to False should return None."""
     assert data.clusters(globular=False, open=False) is None