Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
970ad11b
Commit
970ad11b
authored
Mar 10, 2005
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Forward-port further unit test cleanup from 2.7 branch.
parent
06cb5aac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/python/zdaemon/tests/testzdrun.py
lib/python/zdaemon/tests/testzdrun.py
+5
-5
No files found.
lib/python/zdaemon/tests/testzdrun.py
View file @
970ad11b
...
@@ -80,7 +80,7 @@ class ZDaemonTests(unittest.TestCase):
...
@@ -80,7 +80,7 @@ class ZDaemonTests(unittest.TestCase):
args
[
i
]
=
'"%s"'
%
args
[
i
]
args
[
i
]
=
'"%s"'
%
args
[
i
]
return
" "
.
join
(
args
)
return
" "
.
join
(
args
)
def
rundaemon
(
self
,
args
):
def
_
rundaemon
(
self
,
args
):
# Add quotes, in case some pathname contains spaces (e.g. Mac OS X)
# Add quotes, in case some pathname contains spaces (e.g. Mac OS X)
args
=
self
.
quoteargs
(
args
)
args
=
self
.
quoteargs
(
args
)
cmd
=
(
'PYTHONPATH="%s" "%s" "%s" -d -s "%s" %s'
%
cmd
=
(
'PYTHONPATH="%s" "%s" "%s" -d -s "%s" %s'
%
...
@@ -106,7 +106,7 @@ class ZDaemonTests(unittest.TestCase):
...
@@ -106,7 +106,7 @@ class ZDaemonTests(unittest.TestCase):
self
.
expect
=
"expected
\
n
"
self
.
expect
=
"expected
\
n
"
def
testSystem
(
self
):
def
testSystem
(
self
):
self
.
rundaemon
([
"echo"
,
"-n"
])
self
.
_
rundaemon
([
"echo"
,
"-n"
])
self
.
expect
=
""
self
.
expect
=
""
## def testInvoke(self):
## def testInvoke(self):
...
@@ -114,7 +114,7 @@ class ZDaemonTests(unittest.TestCase):
...
@@ -114,7 +114,7 @@ class ZDaemonTests(unittest.TestCase):
## self.expect = ""
## self.expect = ""
## def testControl(self):
## def testControl(self):
## self.rundaemon(["sleep", "1000"])
## self.
_
rundaemon(["sleep", "1000"])
## time.sleep(1)
## time.sleep(1)
## self._run("stop")
## self._run("stop")
## time.sleep(1)
## time.sleep(1)
...
@@ -122,7 +122,7 @@ class ZDaemonTests(unittest.TestCase):
...
@@ -122,7 +122,7 @@ class ZDaemonTests(unittest.TestCase):
## self.expect = "Sent SIGTERM\nExiting now\n"
## self.expect = "Sent SIGTERM\nExiting now\n"
## def testStop(self):
## def testStop(self):
## self.rundaemon([self.python, self.nokill])
## self.
_
rundaemon([self.python, self.nokill])
## time.sleep(1)
## time.sleep(1)
## self._run("stop")
## self._run("stop")
## time.sleep(1)
## time.sleep(1)
...
@@ -252,7 +252,7 @@ class ZDaemonTests(unittest.TestCase):
...
@@ -252,7 +252,7 @@ class ZDaemonTests(unittest.TestCase):
touch_cmd
=
"/bin/touch"
touch_cmd
=
"/bin/touch"
if
not
os
.
path
.
exists
(
touch_cmd
):
if
not
os
.
path
.
exists
(
touch_cmd
):
touch_cmd
=
"/usr/bin/touch"
# Mac OS X
touch_cmd
=
"/usr/bin/touch"
# Mac OS X
self
.
rundaemon
([
"-m"
,
"666"
,
touch_cmd
,
path
])
self
.
_
rundaemon
([
"-m"
,
"666"
,
touch_cmd
,
path
])
for
i
in
range
(
5
):
for
i
in
range
(
5
):
if
not
os
.
path
.
exists
(
path
):
if
not
os
.
path
.
exists
(
path
):
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
...
...
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