Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
cloudooo
Commits
7e221943
Commit
7e221943
authored
Feb 05, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: patch OpenOffice._startProcess not to put bogus output to stderr.
that prevents detecting the end of unit test.
parent
1c3f3819
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
cloudooo/tests/handlerTestCase.py
cloudooo/tests/handlerTestCase.py
+21
-0
No files found.
cloudooo/tests/handlerTestCase.py
View file @
7e221943
...
...
@@ -108,6 +108,27 @@ def stopFakeEnvironment(stop_openoffice=True):
openoffice
.
stop
()
return
True
if
1
:
from
cloudooo.handler.ooo.application.openoffice
import
OpenOffice
from
cloudooo.handler.ooo.util
import
waitStartDaemon
,
waitStopDaemon
from
subprocess
import
Popen
,
PIPE
# patch OpenOffice._startProcess not to put bogus output to stderr,
# that prevents detecting the end of unit test.
def
_startProcess
(
self
,
command
,
env
):
"""Start OpenOffice.org process"""
for
i
in
range
(
5
):
self
.
stop
()
waitStopDaemon
(
self
,
self
.
timeout
)
self
.
process
=
Popen
(
command
,
stderr
=
PIPE
,
close_fds
=
True
,
env
=
env
)
if
not
waitStartDaemon
(
self
,
self
.
timeout
):
continue
if
self
.
_testOpenOffice
(
self
.
hostname
,
self
.
port
):
return
OpenOffice
.
_startProcess
=
_startProcess
class
HandlerTestCase
(
unittest
.
TestCase
):
"""Test Case to load cloudooo conf."""
...
...
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