From 29474c7a227050b16fc341bdf7df68112793a23d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 21 Oct 2014 17:54:58 +0200 Subject: PythonTest_dbaccess_python: don't modify source document Change-Id: I4e8f94554141e41863c474c5f99be4b1974f3dd7 --- dbaccess/qa/python/fdo84315.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dbaccess') diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py index bf13e1bf5758..06b2a6c0734e 100644 --- a/dbaccess/qa/python/fdo84315.py +++ b/dbaccess/qa/python/fdo84315.py @@ -7,8 +7,10 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +import os import unittest from collections import deque +import unohelper from org.libreoffice.unotest import UnoInProcess class Fdo84315(unittest.TestCase): @@ -23,7 +25,10 @@ class Fdo84315(unittest.TestCase): @classmethod def tearDownClass(cls): + # Closing the connection properly would modify the source document for some reason. + lock = unohelper.fileUrlToSystemPath(cls._xDoc.URL) + ".lck" cls._uno.tearDown() + os.remove(lock) def test_fdo84315(self): xDoc = self.__class__._xDoc @@ -66,7 +71,6 @@ class Fdo84315(unittest.TestCase): while xResultset.next(): self.assertEqual(xResultset.getInt(1), expected_values.popleft()) self.assertEqual(len(expected_values), 0) - xCon.dispose() if __name__ == '__main__': unittest.main() -- cgit