Skip to content

Commit

Permalink
add regression test handling region string with white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
joleroi committed May 18, 2017
1 parent d3c6149 commit 46a0743
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions regions/io/ds9/tests/test_ds9_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ def test_ds9_string_to_objects():
assert_allclose(reg.center.dec.deg, 43)
assert_allclose(reg.radius.value, 3)

def test_ds9_string_to_objects_whitespace():
"""Simple test case for ds9_string_to_objects
"""
ds9_str = '# Region file format: DS9 astropy/regions\nfk5\n circle(42.0000,43.0000,3.0000)\n'
parser = DS9Parser(ds9_str)
parser.run()
regions = parser.shapes.to_region()
reg = regions[0]

assert_allclose(reg.center.ra.deg, 42)
assert_allclose(reg.center.dec.deg, 43)
assert_allclose(reg.radius.value, 3)


def test_ds9_io(tmpdir):
"""Simple test case for write_ds9 and read_ds9.
Expand Down

0 comments on commit 46a0743

Please sign in to comment.