Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
7f2b1875
Commit
7f2b1875
authored
Oct 15, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended test case
parent
9cc37c4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
tests/run/withstat_py.py
tests/run/withstat_py.py
+22
-0
No files found.
tests/run/withstat_py.py
View file @
7f2b1875
...
...
@@ -181,6 +181,28 @@ def multimanager():
print
(
'%s %s %s %s %s'
%
(
a
,
b
,
c
,
d
,
e
))
print
(
nested
)
class
GetManager
(
object
):
def
get
(
self
,
*
args
):
return
ContextManager
(
*
args
)
def
manager_from_expression
():
"""
>>> manager_from_expression()
enter
1
exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
enter
2
exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
"""
with
GetManager
().
get
(
1
)
as
x
:
print
x
g
=
GetManager
()
with
g
.
get
(
2
)
as
x
:
print
x
# Tests borrowed from pyregr test_with.py,
# modified to follow the constraints of Cython.
import
unittest
...
...
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