Skip to content

Commit 901e810

Browse files
committed
Fix some tests
1 parent 772f47b commit 901e810

File tree

5 files changed

+16
-36
lines changed

5 files changed

+16
-36
lines changed

src/core/IronPython.Modules/_ctypes/SimpleType.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@ public SimpleType(CodeContext/*!*/ context, string name, PythonTuple bases, Pyth
5858
case 'H': _type = SimpleTypeKind.UnsignedShort; break;
5959
case 'i': _type = SimpleTypeKind.SignedInt; break;
6060
case 'I': _type = SimpleTypeKind.UnsignedInt; break;
61-
case 'l': _type = SimpleTypeKind.SignedLong; break;
62-
case 'L': _type = SimpleTypeKind.UnsignedLong; break;
61+
case 'l':
62+
_type = SimpleTypeKind.SignedLong;
63+
_charType = TypecodeOps.IsCLong32Bit ? _charType : 'q';
64+
break;
65+
case 'L':
66+
_type = SimpleTypeKind.UnsignedLong;
67+
_charType = TypecodeOps.IsCLong32Bit ? _charType : 'Q';
68+
break;
6369
case 'f': _type = SimpleTypeKind.Single; break;
6470
case 'g': // long double, new in 2.6
6571
case 'd': _type = SimpleTypeKind.Double; break;

src/core/IronPython.Modules/nt.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ public static object open(CodeContext/*!*/ context, [NotNone] string path, int f
849849
}
850850
}
851851

852+
VerifyPath(path, functionName: nameof(open), argName: nameof(path));
853+
852854
if ((RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) && !ClrModule.IsMono) {
853855
// Use PosixFileStream to operate on fd directly
854856
// On Mono, we must use FileStream due to limitations in MemoryMappedFile

tests/IronPython.Tests/Cases/CPythonCasesManifest.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ Timeout=120000 # 2 minute timeout
77
[CPython.ctypes.test_as_parameter]
88
Ignore=true
99

10-
[CPython.ctypes.test_bitfields] # IronPython.modules.type_related.test_bitfields_ctypes_stdlib
11-
Ignore=true
12-
1310
[CPython.ctypes.test_cast]
1411
RunCondition=NOT $(IS_POSIX) # https://github.com/IronLanguages/ironpython3/issues/1455
1512

tests/suite/modules/type_related/test_bitfields_ctypes_stdlib.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

tests/suite/test_array_stdlib.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
## Run selected tests from test_array from StdLib
77
##
88

9-
from iptest import is_ironpython, generate_suite, run_test
9+
from iptest import is_ironpython, generate_suite, run_test, is_windows
1010

1111
import test.test_array
1212

@@ -61,6 +61,11 @@ def load_tests(loader, standard_tests, pattern):
6161
test.test_array.UnsignedShortTest('test_type_error'), # https://github.com/IronLanguages/ironpython3/issues/767
6262
]
6363

64+
if not is_windows:
65+
failing_tests += [
66+
test.test_array.LongTest('test_overflow'), # OverflowError: couldn't convert Intable to Int64
67+
]
68+
6469
return generate_suite(tests, failing_tests)
6570

6671
else:

0 commit comments

Comments
 (0)