@@ -0,0 +1,982 @@
+# coding: utf-8%0A%0A%22%22%22 test reading/writing potentials to files %22%22%22%0A%0Afrom __future__ import division, print_function%0A%0A__author__ = %22adrn %3Cadrn@astro.columbia.edu%3E%22%0A%0A# Standard library%0Aimport os, sys%0A%0A# Third-party%0Aimport numpy as np%0Afrom astropy import log as logger%0Aimport astropy.units as u%0A%0A# Project%0Afrom ..io import read, write%0Afrom ..builtin import IsochronePotential%0Afrom ...units import galactic%0A%0A# TODO: config item to specify path to test data?%0Atest_data_path = os.path.abspath(os.path.join(os.path.split(__file__)%5B0%5D,%0A                                 %22../../../test-data/%22))%0A%0Adef test_read():%0A    f1 = os.path.join(test_data_path, 'potential', 'isochrone.yml')%0A    potential = read(f1)%0A    print(repr(potential))%0A%0Adef test_write():%0A%0A    tmp_filename = %22/tmp/potential.yml%22%0A%0A    # try a simple potential%0A    potential = IsochronePotential(m=1E11, b=0.76, units=galactic)%0A%0A    with open(tmp_filename,'w') as f:%0A        write(potential, f)%0A%0A    write(potential, tmp_filename)%0A

add tests for reading