Author: Armin Rigo <[email protected]>
Branch:
Changeset: r3036:829f829f9c5c
Date: 2017-10-01 09:09 +0200
http://bitbucket.org/cffi/cffi/changeset/829f829f9c5c/
Log: Can't really "import platform" here, for pypy
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -2110,11 +2110,8 @@
if sys.platform.startswith("linux"):
BWChar = new_primitive_type("wchar_t")
assert sizeof(BWChar) == 4
- import platform
- if platform.machine().startswith(('arm', 'aarch64')):
- assert int(cast(BWChar, -1)) == 4294967295 # unsigned, on ARM
- else:
- assert int(cast(BWChar, -1)) == -1 # "often" signed...
+ # wchar_t is often signed on Linux, but not always (e.g. on ARM)
+ assert int(cast(BWChar, -1)) in (-1, 4294967295)
def test_char16():
BChar16 = new_primitive_type("char16_t")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit