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
Gwenaël Samain
cython
Commits
ff495c9d
Commit
ff495c9d
authored
Oct 28, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add embedding to the test suite
parent
ac5bf544
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
Demos/embed/Makefile
Demos/embed/Makefile
+1
-1
runtests.py
runtests.py
+25
-0
No files found.
Demos/embed/Makefile
View file @
ff495c9d
...
...
@@ -16,7 +16,7 @@ all: embedded
clean
:
@
echo
Cleaning Demos/embed
@
rm
-f
*
~
*
.o
*
.so core core.
*
*
.c embedded
@
rm
-f
*
~
*
.o
*
.so core core.
*
*
.c embedded
test.output
test
:
clean all
./embedded
>
test.output
...
...
runtests.py
View file @
ff495c9d
...
...
@@ -127,6 +127,9 @@ class TestBuilder(object):
continue
suite
.
addTest
(
self
.
handle_directory
(
path
,
filename
))
if
sys
.
platform
not
in
[
'win32'
]:
if
[
1
for
selector
in
self
.
selectors
if
selector
(
"embedded"
)]:
suite
.
addTest
(
unittest
.
makeSuite
(
EmbedTest
))
return
suite
def
handle_directory
(
self
,
path
,
context
):
...
...
@@ -555,6 +558,28 @@ def collect_doctests(path, module_prefix, suite, selectors):
except
ValueError
:
# no tests
pass
# TODO: Support cython_freeze needed here as well.
# TODO: Windows support.
class
EmbedTest
(
unittest
.
TestCase
):
working_dir
=
"Demos/embed"
def
setUp
(
self
):
self
.
old_dir
=
os
.
getcwd
()
os
.
chdir
(
self
.
working_dir
)
os
.
system
(
"make clean > /dev/null"
)
def
tearDown
(
self
):
try
:
os
.
system
(
"make clean > /dev/null"
)
except
:
pass
os
.
chdir
(
self
.
old_dir
)
def
test_embed
(
self
):
self
.
assert_
(
os
.
system
(
"make test > make.output"
)
==
0
)
class
MissingDependencyExcluder
:
def
__init__
(
self
,
deps
):
# deps: { module name : matcher func }
...
...
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