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
e6a1d09b
Commit
e6a1d09b
authored
Jul 06, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable running the tests in Py3.1
parent
fb651ae7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
runtests.py
runtests.py
+31
-5
No files found.
runtests.py
View file @
e6a1d09b
...
...
@@ -544,10 +544,38 @@ if __name__ == '__main__':
options
,
cmd_args
=
parser
.
parse_args
()
if
sys
.
version_info
[
0
]
>=
3
:
# make sure we do not import (or run) Cython itself
DISTDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
sys
.
argv
[
0
]))
ROOTDIR
=
os
.
path
.
join
(
DISTDIR
,
'tests'
)
WORKDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
'BUILD'
)
if
sys
.
version_info
>=
(
3
,
1
):
options
.
doctests
=
False
options
.
unittests
=
False
options
.
pyregr
=
False
if
options
.
with_cython
:
# need to convert Cython sources first
import
lib2to3.refactor
from
distutils.util
import
copydir_run_2to3
fixers
=
[
fix
for
fix
in
lib2to3
.
refactor
.
get_fixers_from_package
(
"lib2to3.fixes"
)
if
fix
.
split
(
'fix_'
)[
-
1
]
not
in
(
'next'
,)
]
cy3_dir
=
os
.
path
.
join
(
WORKDIR
,
'Cy3'
)
if
not
os
.
path
.
exists
(
cy3_dir
):
os
.
makedirs
(
cy3_dir
)
import
distutils.log
as
dlog
dlog
.
set_threshold
(
dlog
.
DEBUG
)
copydir_run_2to3
(
DISTDIR
,
cy3_dir
,
fixer_names
=
fixers
,
template
=
'''
global-exclude *
graft Cython
recursive-exclude Cython *
recursive-include Cython *.py *.pyx *.pxd
'''
)
sys
.
path
.
insert
(
0
,
cy3_dir
)
elif
sys
.
version_info
[
0
]
>=
3
:
# make sure we do not import (or run) Cython itself
options
.
with_cython
=
False
options
.
doctests
=
False
options
.
unittests
=
False
options
.
pyregr
=
False
...
...
@@ -567,14 +595,12 @@ if __name__ == '__main__':
Errors
.
LEVEL
=
0
# show all warnings
# RUN ALL TESTS!
ROOTDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
'tests'
)
WORKDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
'BUILD'
)
UNITTEST_MODULE
=
"Cython"
UNITTEST_ROOT
=
os
.
path
.
join
(
os
.
getcwd
(),
UNITTEST_MODULE
)
if
WITH_CYTHON
:
if
os
.
path
.
exists
(
WORKDIR
):
for
path
in
os
.
listdir
(
WORKDIR
):
if
path
in
(
"support"
,):
continue
if
path
in
(
"support"
,
"Cy3"
):
continue
shutil
.
rmtree
(
os
.
path
.
join
(
WORKDIR
,
path
),
ignore_errors
=
True
)
if
not
os
.
path
.
exists
(
WORKDIR
):
os
.
makedirs
(
WORKDIR
)
...
...
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