pyuno/qa/pytests/testcollections_base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 4bf3b4ee48c4e3556e257aa77940f68c13b05b54 Author: Stephan Bergmann <[email protected]> Date: Tue Sep 26 17:49:47 2017 +0200 Call pyuno.private_initTestEnvironment() only once ...instead of once for each class derived from CollectionsTestBase (as listed in pyuno/PythonTest_pyuno_pytests_testcollections.mk), causing the assert(!pSVData->maDeInitHook.IsSet()); in Application::setDeInitHook (vcl/source/app/svapp.cxx) to fire. This is probably far from being idiomatic Python code... Change-Id: I8cd1470c085b16b7b82468a308cfd1dead2db034 diff --git a/pyuno/qa/pytests/testcollections_base.py b/pyuno/qa/pytests/testcollections_base.py index b3fcd2eb92f8..d3e8068820cf 100644 --- a/pyuno/qa/pytests/testcollections_base.py +++ b/pyuno/qa/pytests/testcollections_base.py @@ -13,13 +13,17 @@ import uno from org.libreoffice.unotest import pyuno from com.sun.star.beans import PropertyValue +testEnvironmentInitialized = False class CollectionsTestBase(unittest.TestCase): @classmethod def setUpClass(cls): cls.context = pyuno.getComponentContext() - pyuno.private_initTestEnvironment() + global testEnvironmentInitialized + if not testEnvironmentInitialized: + pyuno.private_initTestEnvironment() + testEnvironmentInitialized = True def setUp(self): self._components = [] _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
