Commits

Armin Rigo  committed 037096d

Fix these tests for Python 3.

  • Participants
  • Parent commits 5109c40

Comments (0)

Files changed (1)

File 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"
     ''')