Author: Matti Picus <matti.pi...@gmail.com>
Branch: 
Changeset: r93666:bb18ac9e65d5
Date: 2018-01-14 18:18 +0200
http://bitbucket.org/pypy/pypy/changeset/bb18ac9e65d5/

Log:    fix failing test, rposix_scandir.has_name_bytes no longer exists

diff --git a/rpython/rlib/test/test_rposix_scandir.py 
b/rpython/rlib/test/test_rposix_scandir.py
--- a/rpython/rlib/test/test_rposix_scandir.py
+++ b/rpython/rlib/test/test_rposix_scandir.py
@@ -2,19 +2,23 @@
 import py
 from rpython.rlib import rposix_scandir
 
+if sys.platform == 'win32':
+    basedir = os.environ.get('LOCALAPPDATA', r'C:\users')
+    func = rposix_scandir.get_name_unicode
+else:
+    basedir = '/'
+    func = rposix_scandir.get_name_bytes
 
 class TestScanDir(object):
 
-    @py.test.mark.skipif("sys.platform == 'win32'")   # XXX
     def test_name_bytes(self):
-        scan = rposix_scandir.opendir('/')
+        scan = rposix_scandir.opendir(basedir)
         found = []
         while True:
             p = rposix_scandir.nextentry(scan)
             if not p:
                 break
-            assert rposix_scandir.has_name_bytes(p)
-            found.append(rposix_scandir.get_name_bytes(p))
+            found.append(func(p))
         rposix_scandir.closedir(scan)
         found.remove('.')
         found.remove('..')
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to