rlib/test/test_rposix_scandir.py::TestScanDir::()::test_name_bytes
self = <rpython.rlib.test.test_rposix_scandir.TestScanDir object at 0x000002815c8b29f8>
def test_name_bytes(self):
for func in funcs:
> scan = rposix_scandir.opendir(basedir, len(basedir))
rlib\test\test_rposix_scandir.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'C:\\Users\\matti\\AppData\\Local', lgt = 32
def opendir(path, lgt):
if lgt == 0:
path = '.'
if path[-1] not in ('\\', '/', ':'):
mask = path + '\\*.*'
lgt += 4
else:
mask = path + '*.*'
lgt += 3
dirp = lltype.malloc(SCANDIRP.TO, flavor='raw')
with rffi.scoped_utf82wcharp(mask, lgt) as src_buf:
hFindFile = win32traits.FindFirstFile(src_buf, dirp.filedata)
if hFindFile == rwin32.INVALID_HANDLE_VALUE:
error = rwin32.GetLastError_saved()
lltype.free(dirp, flavor='raw')
> raise WindowsError(error, "FindFirstFileW failed")
E WindowsError: [Error 2] FindFirstFileW failed
rlib\rposix_scandir.py:91: WindowsError
(somefailed=True in rlib/test/test_rposix_scandir.py)
builder: rpython-win-x86-64 build #399
test: rlib/test/test_rposix_scandir/py/TestScanDir/()/test_name_bytes