from .. import acq_stats


def test_calc_stats():
    acq_stats.calc_stats(17210)

@@ -1,8 +1,35 @@
+import tempfile%0Aimport os%0A%0A
 from .. 
@@ -102,8 +102,571 @@
 (17210)%0A
+%0A%0Adef test_make_acq_stats():%0A    %22%22%22%0A    Save the acq stats for one obsid into a newly-created table%0A    %22%22%22%0A    # Get a temporary file, but then delete it, because _save_acq_stats will only%0A    # make a new table if the supplied file doesn't exist%0A    fh, fn = tempfile.mkstemp(suffix='.h5')%0A    os.unlink(fn)%0A    acq_stats.table_file = fn%0A    obsid = 20001%0A    obsid_info, acq, star_info, catalog, temp = acq_stats.calc_stats(obsid)%0A    t = acq_stats.table_acq_stats(obsid_info, acq, star_info, catalog, temp)%0A    acq_stats._save_acq_stats(t)%0A    os.unlink(fn)%0A

Add a test that makes a new acq stats database