Revision: 633
http://rpy.svn.sourceforge.net/rpy/?rev=633&view=rev
Author: lgautier
Date: 2008-08-17 10:58:53 +0000 (Sun, 17 Aug 2008)
Log Message:
-----------
Added test for mapping S4 instances.
Modified Paths:
--------------
branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py
Modified: branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py
===================================================================
--- branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py 2008-08-17
10:56:14 UTC (rev 632)
+++ branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py 2008-08-17
10:58:53 UTC (rev 633)
@@ -54,7 +54,14 @@
self.assertTrue(isinstance(robjects.default_ri2py(sexp),
robjects.REnvironment))
- #FIXME: test S4
+ def testMapperR2Python_s4(self):
+ robjects.r('setClass("A", representation(x="integer"))')
+ classname = rinterface.StrSexpVector(["A", ])
+ one = rinterface.IntSexpVector([1, ])
+ sexp = rinterface.globalEnv.get("new")(classname,
+ x=one)
+ self.assertTrue(isinstance(robjects.default_ri2py(sexp),
+ robjects.RS4))
def testMapperPy2R_integer(self):
py = 1
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list