From 8e6b72470bd7ce8a709b2538e4cd2becd16154ae Mon Sep 17 00:00:00 2001 From: lim Date: Mon, 21 May 2012 18:19:51 +0000 Subject: lim fixed tests that failed because of image de-compression on SVN git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@16923 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 4bf54e5d84f6f6984ce3ad70ed05b1e048de6f02 --- lib/test/test_shared.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/test/test_shared.py (limited to 'lib/test/test_shared.py') diff --git a/lib/test/test_shared.py b/lib/test/test_shared.py new file mode 100644 index 0000000..fa7d249 --- /dev/null +++ b/lib/test/test_shared.py @@ -0,0 +1,12 @@ +import os + +def resolve_imagename(ROOT_DIR, base_name): + """Resolve image name for tests.""" + + image_name = os.path.join(ROOT_DIR, base_name) + + # Is it zipped? + if not os.path.isfile(image_name): + image_name.replace('.fits', '.fits.gz') + + return image_name -- cgit