[pypy-commit] pypy py3k-update: Catch SyntaxError on test_resource.py so that the test is skipped when trying to run py3 code on py2

rlamy pypy.commits at gmail.com
Wed Apr 27 14:55:57 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k-update
Changeset: r83995:a07e00918a68
Date: 2016-04-27 19:46 +0100
http://bitbucket.org/pypy/pypy/changeset/a07e00918a68/

Log:	Catch SyntaxError on test_resource.py so that the test is skipped
	when trying to run py3 code on py2

diff --git a/pypy/module/test_lib_pypy/test_resource.py b/pypy/module/test_lib_pypy/test_resource.py
--- a/pypy/module/test_lib_pypy/test_resource.py
+++ b/pypy/module/test_lib_pypy/test_resource.py
@@ -6,7 +6,7 @@
 
 try:
     from lib_pypy import resource
-except ImportError as e:
+except (ImportError, SyntaxError) as e:
     skip(str(e))
 
 


More information about the pypy-commit mailing list