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
7a0f63b2
Commit
7a0f63b2
authored
Jul 12, 2011
by
Dag Sverre Seljebotn
Committed by
Mark Florisson
Jul 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for problem with CythonUtilityCode overwriting __test__
parent
31609acb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
Cython/Compiler/UtilityCode.py
Cython/Compiler/UtilityCode.py
+3
-0
tests/run/cythonscope.pyx
tests/run/cythonscope.pyx
+7
-8
No files found.
Cython/Compiler/UtilityCode.py
View file @
7a0f63b2
...
...
@@ -43,6 +43,9 @@ class CythonUtilityCode:
def
get_tree
(
self
):
from
AnalysedTreeTransforms
import
AutoTestDictTransform
# The AutoTestDictTransform creates the statement "__test__ = {}",
# which when copied into the main ModuleNode overwrites
# any __test__ in user code; not desired
excludes
=
[
AutoTestDictTransform
]
import
Pipeline
...
...
tests/run/cythonscope.pyx
View file @
7a0f63b2
"""
>>> f()
hello from cython scope, value=4
hello from cython.view scope, value=4
hello from cython scope, value=3
hello from cython.view scope, value=3
"""
cimport
cython
from
cython
cimport
_testscope
as
tester
...
...
@@ -13,6 +5,13 @@ from cython.view cimport _testscope as viewtester
def
f
():
"""
>>> f()
hello from cython scope, value=4
hello from cython.view scope, value=4
hello from cython scope, value=3
hello from cython.view scope, value=3
"""
print
cython
.
_testscope
(
4
)
print
cython
.
view
.
_testscope
(
4
)
print
tester
(
3
)
...
...
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