[tracker-miners/wip/jfelder/audio-writeback: 6/8] functional-tests: Ensure writeback tests load data from the build tree



commit 49f2088d86eaacc1b33a683fc185735f7db4fadc
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon Jul 8 15:32:56 2019 +0100

    functional-tests: Ensure writeback tests load data from the build tree
    
    We don't support installing the functional-tests any more.

 tests/functional-tests/common/utils/writebacktest.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/writebacktest.py 
b/tests/functional-tests/common/utils/writebacktest.py
index a7b0a4faf..b1f4f249e 100644
--- a/tests/functional-tests/common/utils/writebacktest.py
+++ b/tests/functional-tests/common/utils/writebacktest.py
@@ -42,12 +42,7 @@ class CommonTrackerWritebackTest (ut.TestCase):
     """
 
     def __prepare_directories(self):
-        if (os.path.exists(os.getcwd() + "/test-writeback-data")):
-            # Use local directory if available
-            datadir = os.getcwd() + "/test-writeback-data"
-        else:
-            datadir = os.path.join(cfg.DATADIR, "tracker-tests",
-                                   "test-writeback-data")
+        datadir = os.path.join(os.path.dirname(__file__), '..', '..', 'test-writeback-data')
 
         for testfile in [TEST_FILE_JPEG, TEST_FILE_PNG, TEST_FILE_TIFF]:
             origin = os.path.join(datadir, testfile)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]