[pypy-commit] cffi cffi-1.0: really fix the test
arigo
noreply at buildbot.pypy.org
Sun May 3 19:52:04 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1909:e0a9cf75f232
Date: 2015-05-03 19:23 +0200
http://bitbucket.org/cffi/cffi/changeset/e0a9cf75f232/
Log: really fix the test
diff --git a/_cffi1/test_verify1.py b/_cffi1/test_verify1.py
--- a/_cffi1/test_verify1.py
+++ b/_cffi1/test_verify1.py
@@ -624,7 +624,10 @@
s = ffi.new("foo_s *")
s.f = 1
assert s.f == 1
- two = int(ffi.cast("foo_e", 2)) # may be 2 or -2 based on the sign
+ if int(ffi.cast("foo_e", -1)) < 0:
+ two = -2
+ else:
+ two = 2
s.f = two
assert s.f == two
More information about the pypy-commit
mailing list