Revision: 631
          http://rpy.svn.sourceforge.net/rpy/?rev=631&view=rev
Author:   lgautier
Date:     2008-08-17 10:38:46 +0000 (Sun, 17 Aug 2008)

Log Message:
-----------
- Split tests cases into two classes: one about mapping tests, one about R 
process tests.

- Added test for the problem with repr() and line terminators on WinXP 
(reported by Vince 
Fulco)

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:35:41 UTC (rev 630)
+++ branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py     2008-08-17 
10:38:46 UTC (rev 631)
@@ -3,7 +3,7 @@
 rinterface = robjects.rinterface
 import array
 
-class RObjectTestCase(unittest.TestCase):
+class RInstanceTestCase(unittest.TestCase):
 
     def testGetItem(self):
         letters_R = robjects.r["letters"]
@@ -22,7 +22,14 @@
         for i, li in enumerate(myList):
             self.assertEquals(i, myList[i][0])
 
+
+    def testEval(self):
+        # vector long enough to span across more than one line
+        x = robjects.baseNameSpaceEnv['seq'](1, 50, 2)
+        res = robjects.r('sum(%s)' %repr(x))
+        self.assertEquals(625, res[0])
         
+class MappingTestCase(unittest.TestCase):
 
     def testMapperR2Python_string(self):
         sexp = rinterface.globalEnv.get("letters")
@@ -82,7 +89,8 @@
         self.assertTrue(isinstance(d, Density))
 
 def suite():
-    suite = unittest.TestLoader().loadTestsFromTestCase(RObjectTestCase)
+    suite = unittest.TestLoader().loadTestsFromTestCase(RInstanceTestCase)
+    suite.addTest(unittest.TestLoader().loadTestsFromTestCase(MappingTestCase))
     return suite
 
 if __name__ == '__main__':


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
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to