[pypy-commit] pypy ffistruct: kill duplicate test

antocuni noreply at buildbot.pypy.org
Wed Nov 9 19:12:06 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: ffistruct
Changeset: r49038:92eec651058f
Date: 2011-11-09 17:57 +0100
http://bitbucket.org/pypy/pypy/changeset/92eec651058f/

Log:	kill duplicate test

diff --git a/pypy/module/_ffi/test/test_struct.py b/pypy/module/_ffi/test/test_struct.py
--- a/pypy/module/_ffi/test/test_struct.py
+++ b/pypy/module/_ffi/test/test_struct.py
@@ -77,22 +77,6 @@
         assert fields[0].offset == 0
         assert fields[1].offset == longsize # aligned to WORD
 
-    def test_getfield_setfield(self):
-        from _ffi import _StructDescr, Field, types
-        longsize = types.slong.sizeof()
-        fields = [
-            Field('x', types.slong),
-            Field('y', types.slong),
-            ]
-        descr = _StructDescr('foo', fields)
-        struct = descr.allocate()
-        struct.setfield('x', 42)
-        struct.setfield('y', 43)
-        assert struct.getfield('x') == 42
-        assert struct.getfield('y') == 43
-        mem = self.read_raw_mem(struct.getaddr(), 'c_long', 2)
-        assert mem == [42, 43]
-
     def test_missing_field(self):
         from _ffi import _StructDescr, Field, types
         longsize = types.slong.sizeof()


More information about the pypy-commit mailing list