Skip to content

Commit e5cc4f9

Browse files
committed
[GR-66098] Fix test_platform and test_mailbox on Windows
PullRequest: graalpython/3847
2 parents 9c75f89 + d74edbb commit e5cc4f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ public void postInitialize(Python3Core core) {
345345
PythonModule posix;
346346
if (PythonOS.getPythonOS() == PythonOS.PLATFORM_WIN32) {
347347
posix = core.lookupBuiltinModule(T_NT);
348+
posix.setAttribute(toTruffleStringUncached("chown"), PNone.NO_VALUE);
349+
posix.setAttribute(toTruffleStringUncached("fchown"), PNone.NO_VALUE);
350+
posix.setAttribute(toTruffleStringUncached("lchown"), PNone.NO_VALUE);
348351
} else {
349352
posix = core.lookupBuiltinModule(T_POSIX);
350353
}

graalpython/lib-python/3/test/test_platform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ def test_win32_ver(self):
341341
int(v) # should not fail
342342
if csd:
343343
self.assertTrue(csd.startswith('SP'), msg=csd)
344-
if ptype:
344+
# Truffle change: graalpy does not support registry access
345+
if ptype and ptype != ptype1:
345346
if os.cpu_count() > 1:
346347
self.assertIn('Multiprocessor', ptype)
347348
else:

0 commit comments

Comments
 (0)