summaryrefslogtreecommitdiff
path: root/stsci/sphere/test/test_shared.py
diff options
context:
space:
mode:
Diffstat (limited to 'stsci/sphere/test/test_shared.py')
-rw-r--r--stsci/sphere/test/test_shared.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/stsci/sphere/test/test_shared.py b/stsci/sphere/test/test_shared.py
new file mode 100644
index 0000000..0853d3a
--- /dev/null
+++ b/stsci/sphere/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.exists(image_name):
+ image_name = image_name.replace('.fits', '.fits.gz')
+
+ return image_name