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
Boxiang Sun
cython
Commits
1a0ff5e2
Commit
1a0ff5e2
authored
Jul 29, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle 'cpp' tag in end-to-end srctree tests
parent
b1bef0ae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
4 deletions
+13
-4
Cython/TestUtils.py
Cython/TestUtils.py
+5
-3
runtests.py
runtests.py
+2
-1
tests/build/cpp_cythonize.srctree
tests/build/cpp_cythonize.srctree
+2
-0
tests/build/inline_distutils.srctree
tests/build/inline_distutils.srctree
+2
-0
tests/build/module_api.srctree
tests/build/module_api.srctree
+2
-0
No files found.
Cython/TestUtils.py
View file @
1a0ff5e2
...
...
@@ -172,8 +172,10 @@ def unpack_source_tree(tree_file, dir=None):
header
=
[]
cur_file
=
None
f
=
open
(
tree_file
)
lines
=
f
.
readlines
()
f
.
close
()
try
:
lines
=
f
.
readlines
()
finally
:
f
.
close
()
f
=
None
for
line
in
lines
:
if
line
[:
5
]
==
'#####'
:
...
...
@@ -186,7 +188,7 @@ def unpack_source_tree(tree_file, dir=None):
cur_file
=
open
(
path
,
'w'
)
elif
cur_file
is
not
None
:
cur_file
.
write
(
line
)
el
se
:
el
if
line
.
strip
()
and
not
line
.
lstrip
().
startswith
(
'#'
)
:
header
.
append
(
line
)
if
cur_file
is
not
None
:
cur_file
.
close
()
...
...
runtests.py
View file @
1a0ff5e2
...
...
@@ -376,7 +376,8 @@ class TestBuilder(object):
mode = 'pyregr'
if ext == '.srctree':
suite.addTest(EndToEndTest(filepath, workdir, self.cleanup_workdir))
if 'cpp' not in tags['tag'] or 'cpp' in self.languages:
suite.addTest(EndToEndTest(filepath, workdir, self.cleanup_workdir))
continue
# Choose the test suite.
...
...
tests/build/cpp_cythonize.srctree
View file @
1a0ff5e2
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON -c "import a; a.use_vector([1,2,3])"
...
...
tests/build/inline_distutils.srctree
View file @
1a0ff5e2
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
...
...
tests/build/module_api.srctree
View file @
1a0ff5e2
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON test.py
...
...
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