From: Ole Streicher <olebole@debian.org>
Date: Sat, 12 Nov 2016 10:40:42 +0100
Subject: Take the test data from a central location,
 and allow overwriting the location

---
 drizzle/tests/helpers.py       | 3 +--
 drizzle/tests/test_resample.py | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drizzle/tests/helpers.py b/drizzle/tests/helpers.py
index e3eaa2a..e444f2a 100644
--- a/drizzle/tests/helpers.py
+++ b/drizzle/tests/helpers.py
@@ -19,8 +19,7 @@ from astropy.modeling.projections import AffineTransformation2D
 
 __all__ = ["wcs_from_file"]
 
-TEST_DIR = os.path.abspath(os.path.dirname(__file__))
-DATA_DIR = os.path.join(TEST_DIR, 'data')
+DATA_DIR = os.environ.get('DRIZZLE_TEST_DIR', '/usr/share/python-drizzle/test_data')
 
 
 def wcs_from_file(filename, ext=None, return_data=False, crpix_shift=None,
diff --git a/drizzle/tests/test_resample.py b/drizzle/tests/test_resample.py
index 3f18ce5..acfe9a7 100644
--- a/drizzle/tests/test_resample.py
+++ b/drizzle/tests/test_resample.py
@@ -10,8 +10,7 @@ from drizzle import cdrizzle, resample, utils
 
 from .helpers import wcs_from_file
 
-TEST_DIR = os.path.abspath(os.path.dirname(__file__))
-DATA_DIR = os.path.join(TEST_DIR, 'data')
+DATA_DIR = os.environ.get('DRIZZLE_TEST_DIR', '/usr/share/python-drizzle/test_data')
 
 
 def bound_image(image):
