summaryrefslogtreecommitdiff
path: root/lib/test/test_shared.py
blob: 0853d3abe70ce878fafb8c78eb9193984c812d0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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