Author: Ronan Lamy <[email protected]>
Branch: py3.6
Changeset: r97683:7f855aa7cb62
Date: 2019-09-30 15:53 +0100
http://bitbucket.org/pypy/pypy/changeset/7f855aa7cb62/

Log:    port test to py3

diff --git a/extra_tests/cffi_tests/test_version.py 
b/extra_tests/cffi_tests/test_version.py
--- a/extra_tests/cffi_tests/test_version.py
+++ b/extra_tests/cffi_tests/test_version.py
@@ -1,7 +1,7 @@
 from email.parser import Parser
 
 import py
-import urllib2
+from urllib.request import urlopen
 
 import cffi
 import pypy
@@ -14,9 +14,8 @@
 
 def test_pycparser_version():
     url = 
'https://raw.githubusercontent.com/eliben/pycparser/master/pycparser/__init__.py'
-    source = urllib2.urlopen(url).read()
+    source = urlopen(url).read().decode('utf8')
     dest = py.path.local(__file__).join('..', '..', '..', 'lib_pypy', 'cffi',
                                         '_pycparser', '__init__.py').read()
     # if this fails, the vendored pycparser is not the latest version
     assert source.strip() == dest.strip()
-    
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to