Skip to content

Commit

Permalink
write test for writeFITSTable
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHancock committed May 5, 2018
1 parent 9ecfd73 commit 733ceee
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from AegeanTools import catalogs as cat
from AegeanTools.models import OutputSource, IslandSource, SimpleSource
from AegeanTools.msq2 import MarchingSquares
from astropy import table
import numpy as np
from numpy.testing import assert_raises
import os
Expand Down Expand Up @@ -219,6 +220,16 @@ def test_table_to_source_list():
raise AssertionError()


def test_writeFITSTable():
tab = table.Table.read('tests/test_files/1904_comp.fits')
outfile = 'dlme.fits'
tab.meta ={'test':'test'}
cat.writeFITSTable(outfile, tab)
if not os.path.exists(outfile):
raise AssertionError()
os.remove(outfile)


if __name__ == "__main__":
# introspect and run all the functions starting with 'test'
for f in dir():
Expand Down

0 comments on commit 733ceee

Please sign in to comment.