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
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
cython
Commits
fdc3d3c8
Commit
fdc3d3c8
authored
May 28, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run uninitialized test in both cpython and cython
parent
d8ffa16c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
tests/run/uninitialized.py
tests/run/uninitialized.py
+3
-4
No files found.
tests/run/uninitialized.py
x
→
tests/run/uninitialized.py
View file @
fdc3d3c8
...
...
@@ -76,7 +76,6 @@ def deleted(cond):
def
test_nested
(
cond
):
"""
>>> test_nested(True)
<built-in function a>
>>> test_nested(False)
Traceback (most recent call last):
...
...
...
@@ -85,7 +84,7 @@ def test_nested(cond):
if
cond
:
def
a
():
pass
return
a
return
a
()
def
test_outer
(
cond
):
"""
...
...
@@ -109,7 +108,7 @@ def test_inner(cond):
>>> test_inner(False)
Traceback (most recent call last):
...
UnboundLocalError: local variable 'a' referenced before assignment
NameError: free variable 'a' referenced before assignment in enclosing scope
"""
if
cond
:
a
=
{}
...
...
@@ -120,7 +119,7 @@ def test_inner(cond):
def
test_class
(
cond
):
"""
>>> test_class(True) #doctest: +ELLIPSIS
<class
uninitialized
.A at 0x...>
<class
..
.A at 0x...>
>>> test_class(False)
Traceback (most recent call last):
...
...
...
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