Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
844315c7
Commit
844315c7
authored
Jun 29, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
609da58a
7f86811d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
Lib/test/test_cprofile.py
Lib/test/test_cprofile.py
+13
-10
No files found.
Lib/test/test_cprofile.py
View file @
844315c7
...
...
@@ -18,16 +18,19 @@ class CProfileTest(ProfileTest):
def
test_bad_counter_during_dealloc
(
self
):
import
_lsprof
# Must use a file as StringIO doesn't trigger the bug.
with
open
(
TESTFN
,
'w'
)
as
file
:
sys
.
stderr
=
file
try
:
obj
=
_lsprof
.
Profiler
(
lambda
:
int
)
obj
.
enable
()
obj
=
_lsprof
.
Profiler
(
1
)
obj
.
disable
()
finally
:
sys
.
stderr
=
sys
.
__stderr__
unlink
(
TESTFN
)
orig_stderr
=
sys
.
stderr
try
:
with
open
(
TESTFN
,
'w'
)
as
file
:
sys
.
stderr
=
file
try
:
obj
=
_lsprof
.
Profiler
(
lambda
:
int
)
obj
.
enable
()
obj
=
_lsprof
.
Profiler
(
1
)
obj
.
disable
()
finally
:
sys
.
stderr
=
orig_stderr
finally
:
unlink
(
TESTFN
)
def
test_main
():
...
...
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