Commits

Armin Rigo committed 037096d

Fix these tests for Python 3.

Comments (0)

Files changed (1)

testing/test_zintegration.py

     run_setup_and_program("distutils_module", '''
     import snip_basic_verify
     p = snip_basic_verify.C.getpwuid(0)
-    assert snip_basic_verify.ffi.string(p.pw_name) == "root"
+    assert snip_basic_verify.ffi.string(p.pw_name) == b"root"
     ''')
 
 def test_distutils_package_1():
     run_setup_and_program("distutils_package_1", '''
     import snip_basic_verify1
     p = snip_basic_verify1.C.getpwuid(0)
-    assert snip_basic_verify1.ffi.string(p.pw_name) == "root"
+    assert snip_basic_verify1.ffi.string(p.pw_name) == b"root"
     ''')
 
 def test_distutils_package_2():
     run_setup_and_program("distutils_package_2", '''
     import snip_basic_verify2
     p = snip_basic_verify2.C.getpwuid(0)
-    assert snip_basic_verify2.ffi.string(p.pw_name) == "root"
+    assert snip_basic_verify2.ffi.string(p.pw_name) == b"root"
     ''')
 
 def test_setuptools_module():
     run_setup_and_program("setuptools_module", '''
     import snip_setuptools_verify
     p = snip_setuptools_verify.C.getpwuid(0)
-    assert snip_setuptools_verify.ffi.string(p.pw_name) == "root"
+    assert snip_setuptools_verify.ffi.string(p.pw_name) == b"root"
     ''')
 
 def test_setuptools_package_1():
     run_setup_and_program("setuptools_package_1", '''
     import snip_setuptools_verify1
     p = snip_setuptools_verify1.C.getpwuid(0)
-    assert snip_setuptools_verify1.ffi.string(p.pw_name) == "root"
+    assert snip_setuptools_verify1.ffi.string(p.pw_name) == b"root"
     ''')
 
 def test_setuptools_package_2():
     run_setup_and_program("setuptools_package_2", '''
     import snip_setuptools_verify2
     p = snip_setuptools_verify2.C.getpwuid(0)
-    assert snip_setuptools_verify2.ffi.string(p.pw_name) == "root"
+    assert snip_setuptools_verify2.ffi.string(p.pw_name) == b"root"
     ''')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.