summaryrefslogtreecommitdiff
path: root/tests/goldtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/goldtest.py')
-rw-r--r--tests/goldtest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/goldtest.py b/tests/goldtest.py
index 8f24f239..af471a14 100644
--- a/tests/goldtest.py
+++ b/tests/goldtest.py
@@ -8,13 +8,17 @@ import sys
from unittest_mixins import change_dir # pylint: disable=unused-import
-from tests.coveragetest import CoverageTest
+from tests.coveragetest import CoverageTest, TESTS_DIR
from tests.test_farm import clean
# Import helpers, eventually test_farm.py will go away.
from tests.test_farm import ( # pylint: disable=unused-import
compare, contains, doesnt_contain, contains_any,
)
+def gold_path(path):
+ """Get a path to a gold file for comparison."""
+ return os.path.join(TESTS_DIR, "farm", path)
+
class CoverageGoldTest(CoverageTest):
"""A test based on gold files."""