Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6c98339f
Kaydet (Commit)
6c98339f
authored
Ock 14, 2017
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
uitest: some pep8 fixes
Change-Id: Ib889604f1b6d11e874c27fb5d2757a792a687366
üst
21248f90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
connection.py
uitest/libreoffice/connection.py
+9
-4
No files found.
uitest/libreoffice/connection.py
Dosyayı görüntüle @
6c98339f
...
...
@@ -22,6 +22,7 @@ except ImportError:
print
(
"URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc"
)
raise
class
OfficeConnection
:
def
__init__
(
self
,
args
):
self
.
args
=
args
...
...
@@ -50,10 +51,10 @@ class OfficeConnection:
self
.
xContext
=
self
.
connect
(
socket
)
def
bootstrap
(
self
,
soffice
,
userdir
,
socket
):
argv
=
[
soffice
,
"--accept="
+
socket
+
";urp"
,
argv
=
[
soffice
,
"--accept="
+
socket
+
";urp"
,
"-env:UserInstallation="
+
userdir
,
"--quickstart=no"
,
"--nofirststartwizard"
,
"--norestore"
,
"--nologo"
]
"--norestore"
,
"--nologo"
]
if
"--valgrind"
in
self
.
args
:
argv
.
append
(
"--valgrind"
)
...
...
@@ -80,7 +81,6 @@ class OfficeConnection:
try
:
xContext
=
xUnoResolver
.
resolve
(
url
)
return
xContext
# except com.sun.star.connection.NoConnectException
except
pyuno
.
getClass
(
"com.sun.star.connection.NoConnectException"
):
print
(
"NoConnectException: sleeping..."
)
time
.
sleep
(
1
)
...
...
@@ -95,7 +95,6 @@ class OfficeConnection:
"com.sun.star.frame.Desktop"
,
self
.
xContext
)
xDesktop
.
terminate
()
print
(
"...done"
)
# except com.sun.star.lang.DisposedException:
except
pyuno
.
getClass
(
"com.sun.star.beans.UnknownPropertyException"
):
print
(
"caught UnknownPropertyException while TearDown"
)
pass
# ignore, also means disposed
...
...
@@ -144,23 +143,29 @@ class PersistentConnection:
def
__init__
(
self
,
args
):
self
.
args
=
args
self
.
connection
=
None
def
getContext
(
self
):
return
self
.
connection
.
xContext
def
setUp
(
self
):
assert
(
not
self
.
connection
)
conn
=
OfficeConnection
(
self
.
args
)
conn
.
setUp
()
self
.
connection
=
conn
def
preTest
(
self
):
assert
(
self
.
connection
)
def
postTest
(
self
):
assert
(
self
.
connection
)
def
tearDown
(
self
):
if
self
.
connection
:
try
:
self
.
connection
.
tearDown
()
finally
:
self
.
connection
=
None
def
kill
(
self
):
if
self
.
connection
and
self
.
connection
.
soffice
:
self
.
connection
.
soffice
.
kill
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment