diff --git a/tests/test_catalog.py b/tests/test_catalog.py index ba59a48480..331b495f88 100644 --- a/tests/test_catalog.py +++ b/tests/test_catalog.py @@ -16,6 +16,7 @@ # and/or other materials provided with the distribution. # +import os import numpy as np import galsim diff --git a/tests/test_draw.py b/tests/test_draw.py index ccd9ae1240..55dc7ab55a 100644 --- a/tests/test_draw.py +++ b/tests/test_draw.py @@ -16,6 +16,7 @@ # and/or other materials provided with the distribution. # +import os import numpy as np import galsim diff --git a/tests/test_real.py b/tests/test_real.py index 62c1effd6f..c95a2d73a3 100644 --- a/tests/test_real.py +++ b/tests/test_real.py @@ -77,8 +77,8 @@ def test_real_galaxy_catalog(): # Test some values that are lazy evaluated: assert rgc.ident[0] == '100533' - assert rgc.gal_file_name[0] == './real_comparison_images/test_images.fits' - assert rgc.psf_file_name[0] == './real_comparison_images/test_images.fits' + assert rgc.gal_file_name[0].split("/")[-2:] == ['real_comparison_images', 'test_images.fits'] + assert rgc.psf_file_name[0].split("/")[-2:] == ['real_comparison_images', 'test_images.fits'] assert rgc.noise_file_name is None np.testing.assert_array_equal(rgc.gal_hdu, [0,1]) np.testing.assert_array_equal(rgc.psf_hdu, [2,3])