Revision: 528 http://rpy.svn.sourceforge.net/rpy/?rev=528&view=rev Author: lgautier Date: 2008-05-21 13:15:07 -0700 (Wed, 21 May 2008)
Log Message: ----------- Added missing new test file Added Paths: ----------- branches/rpy_nextgen/rpy/robjects/tests/testRArray.py Added: branches/rpy_nextgen/rpy/robjects/tests/testRArray.py =================================================================== --- branches/rpy_nextgen/rpy/robjects/tests/testRArray.py (rev 0) +++ branches/rpy_nextgen/rpy/robjects/tests/testRArray.py 2008-05-21 20:15:07 UTC (rev 528) @@ -0,0 +1,29 @@ +import unittest +import rpy2.robjects as robjects +rinterface = robjects.rinterface +import array + +class RArrayTestCase(unittest.TestCase): + + def testNew(self): + letters = robjects.r.letters + self.assertRaises(TypeError, robjects.RArray, letters) + m = robjects.r.matrix(1, nrow=5, ncol=3) + a = robjects.RArray(m) + + def testDim(self): + m = robjects.r.matrix(1, nrow=5, ncol=3) + a = robjects.RArray(m) + d = a.dim + self.assertEquals(2, len(d)) + self.assertEquals(5, d[0]) + self.assertEquals(3, d[1]) + + + +def suite(): + suite = unittest.TestLoader().loadTestsFromTestCase(RArrayTestCase) + return suite + +if __name__ == '__main__': + unittest.main() Property changes on: branches/rpy_nextgen/rpy/robjects/tests/testRArray.py ___________________________________________________________________ Name: svn:eol-style + native 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list