test from_regions
@@ -34,6 +34,19 @@ def test_create(region):
assert not geom.is_allsky
+def test_from_regions(region):
+ RegionGeom.from_regions(region)
+
+ geom = RegionGeom.from_regions("galactic;circle(10,20,3)")
+ assert geom.region.radius.value == 3
+
+ geom = RegionGeom.from_regions(region.center)
+ assert geom.region.center == region.center
+
+ geom = RegionGeom.from_regions([])
+ assert geom.region == None
+
+
def test_binsz(region):
geom = RegionGeom.create(region, binsz_wcs=0.05)
wcs_geom = geom.to_wcs_geom()
