Kaydet (Commit) 4bf3b4ee authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst d1fbc5e6
......@@ -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()
global testEnvironmentInitialized
if not testEnvironmentInitialized:
pyuno.private_initTestEnvironment()
testEnvironmentInitialized = True
def setUp(self):
self._components = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment