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
8588a7d6
Commit
8588a7d6
authored
Jul 20, 2005
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't break if Python distros ship without profile support (Debian, Ubuntu).
parent
d4c1ee91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
+1
-0
lib/python/Testing/ZopeTestCase/profiler.py
lib/python/Testing/ZopeTestCase/profiler.py
+13
-6
No files found.
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
View file @
8588a7d6
Unreleased
Unreleased
- Don't break if Python distros ship without profile support (Debian, Ubuntu).
- Functional.publish() would hang if it got a request_method argument other
- Functional.publish() would hang if it got a request_method argument other
than GET or HEAD while omitting the stdin argument.
than GET or HEAD while omitting the stdin argument.
- installProduct() now becomes a noop if ZopeTestCase did not apply its
- installProduct() now becomes a noop if ZopeTestCase did not apply its
...
...
lib/python/Testing/ZopeTestCase/profiler.py
View file @
8588a7d6
...
@@ -12,14 +12,18 @@
...
@@ -12,14 +12,18 @@
##############################################################################
##############################################################################
"""Profiling support for ZTC
"""Profiling support for ZTC
$Id
: profiler.py,v 1.3 2005/01/01 14:02:44 shh42 Exp
$
$Id$
"""
"""
import
os
,
sys
import
os
,
sys
import
interfaces
import
interfaces
from
profile
import
Profile
# Some distros ship without profile
from
pstats
import
Stats
try
:
from
profile
import
Profile
from
pstats
import
Stats
except
ImportError
:
def
Profile
():
pass
_profile
=
Profile
()
_profile
=
Profile
()
_have_stats
=
0
_have_stats
=
0
...
@@ -30,6 +34,9 @@ strip_dirs = 1
...
@@ -30,6 +34,9 @@ strip_dirs = 1
def
runcall
(
*
args
,
**
kw
):
def
runcall
(
*
args
,
**
kw
):
if
_profile
is
None
:
return
apply
(
args
[
0
],
args
[
1
:],
kw
)
else
:
global
_have_stats
global
_have_stats
_have_stats
=
1
_have_stats
=
1
return
apply
(
_profile
.
runcall
,
args
,
kw
)
return
apply
(
_profile
.
runcall
,
args
,
kw
)
...
...
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