From f49ac8738ec71d8063ac8fa8fa9a994bc97e4d7d Mon Sep 17 00:00:00 2001 From: Christian Jacobs Date: Sun, 8 Feb 2015 13:47:24 +0000 Subject: [PATCH] Make the path to the test.db file relative to the adif.py file. --- pyqso/adif.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyqso/adif.py b/pyqso/adif.py index 9d32506..cd13863 100644 --- a/pyqso/adif.py +++ b/pyqso/adif.py @@ -449,7 +449,8 @@ class TestADIF(unittest.TestCase): def test_adif_write_sqlite3_Row(self): import sqlite3 - self.connection = sqlite3.connect("./unittest_resources/test.db") + import os.path + self.connection = sqlite3.connect(os.path.dirname(os.path.realpath(__file__))+"/unittest_resources/test.db") self.connection.row_factory = sqlite3.Row c = self.connection.cursor()