From f636e53ea9d120ffd3e2cd9c771d6363642d0809 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 6 Aug 2015 11:48:41 +0200 Subject: unotest.py: call the magic bootstrap init function once only Change-Id: I5f775234f44c23386af19f973a9f895a39fa31d5 --- unotest/source/python/org/libreoffice/unotest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'unotest') diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py index f0a43b1b1690..f364219458ac 100644 --- a/unotest/source/python/org/libreoffice/unotest.py +++ b/unotest/source/python/org/libreoffice/unotest.py @@ -170,6 +170,8 @@ class UnoRemoteConnection: finally: self.connection = None +havePonies = False + class UnoInProcess: def getContext(self): return self.xContext @@ -177,7 +179,10 @@ class UnoInProcess: return self.xDoc def setUp(self): self.xContext = pyuno.getComponentContext() - pyuno.private_initTestEnvironment() + global havePonies + if not(havePonies): + pyuno.private_initTestEnvironment() + havePonies = True def openEmptyWriterDoc(self): assert(self.xContext) smgr = self.getContext().ServiceManager -- cgit