From: Stuart Prescott <stuart@debian.org>
Date: Fri, 14 Mar 2025 23:52:43 +1100
Subject: Allow test data location to be set externally

 Existing test suite has restrictions on locations of data files compared
 to the location of the tests that makes in-place testing hard. This patch
 adds an environment variable to override the default test location.
---
 tests/translate/tools/test_poterminology.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/translate/tools/test_poterminology.py b/tests/translate/tools/test_poterminology.py
index 133e0f6..ca7639a 100644
--- a/tests/translate/tools/test_poterminology.py
+++ b/tests/translate/tools/test_poterminology.py
@@ -4,6 +4,11 @@ from translate.storage import factory
 from translate.tools import poterminology
 
 base_dir = Path(__file__).parent.parent.parent
+
+import os
+if "TTKIT_TEST_DATA" in os.environ:
+    base_dir = Path(os.environ["TTKIT_TEST_DATA"])
+
 sample_po_file = base_dir / "xliff_conformance" / "af-pootle.po"
 
 
