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
d6124ba6
Commit
d6124ba6
authored
Jun 11, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed the try-except clauses to match pep8 recommandations.
parent
1f1aeb8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
runtests.py
runtests.py
+16
-8
No files found.
runtests.py
View file @
d6124ba6
...
@@ -101,13 +101,17 @@ def get_distutils_distro(_cache=[]):
...
@@ -101,13 +101,17 @@ def get_distutils_distro(_cache=[]):
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
# TODO: Figure out why this hackery (see http://thread.gmane.org/gmane.comp.python.cython.devel/8280/).
# TODO: Figure out why this hackery (see http://thread.gmane.org/gmane.comp.python.cython.devel/8280/).
config_files
=
distutils_distro
.
find_config_files
()
config_files
=
distutils_distro
.
find_config_files
()
try
:
config_files
.
remove
(
'setup.cfg'
)
try
:
except
ValueError
:
pass
config_files
.
remove
(
'setup.cfg'
)
except
ValueError
:
pass
distutils_distro
.
parse_config_files
(
config_files
)
distutils_distro
.
parse_config_files
(
config_files
)
cfgfiles
=
distutils_distro
.
find_config_files
()
cfgfiles
=
distutils_distro
.
find_config_files
()
try
:
cfgfiles
.
remove
(
'setup.cfg'
)
try
:
except
ValueError
:
pass
cfgfiles
.
remove
(
'setup.cfg'
)
except
ValueError
:
pass
distutils_distro
.
parse_config_files
(
cfgfiles
)
distutils_distro
.
parse_config_files
(
cfgfiles
)
_cache
.
append
(
distutils_distro
)
_cache
.
append
(
distutils_distro
)
return
distutils_distro
return
distutils_distro
...
@@ -1216,8 +1220,10 @@ def run_forked_test(result, run_func, test_name, fork=True):
...
@@ -1216,8 +1220,10 @@ def run_forked_test(result, run_func, test_name, fork=True):
raise Exception("Tests in module '%s' exited with status %d" %
raise Exception("Tests in module '%s' exited with status %d" %
(module_name, result_code))
(module_name, result_code))
finally:
finally:
try: os.unlink(result_file)
try:
except: pass
os.unlink(result_file)
except:
pass
class PureDoctestTestCase(unittest.TestCase):
class PureDoctestTestCase(unittest.TestCase):
def __init__(self, module_name, module_path):
def __init__(self, module_name, module_path):
...
@@ -2160,8 +2166,10 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -2160,8 +2166,10 @@ def runtests(options, cmd_args, coverage=None):
if xml_output_dir:
if xml_output_dir:
from Cython.Tests.xmlrunner import XMLTestRunner
from Cython.Tests.xmlrunner import XMLTestRunner
if not os.path.exists(xml_output_dir):
if not os.path.exists(xml_output_dir):
try: os.makedirs(xml_output_dir)
try:
except OSError: pass # concurrency issue?
os.makedirs(xml_output_dir)
except OSError:
pass # concurrency issue?
test_runner = XMLTestRunner(output=xml_output_dir,
test_runner = XMLTestRunner(output=xml_output_dir,
verbose=options.verbosity > 0)
verbose=options.verbosity > 0)
if options.failfast:
if options.failfast:
...
...
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