Revision: 453
          http://rpy.svn.sourceforge.net/rpy/?rev=453&view=rev
Author:   lgautier
Date:     2008-03-21 10:49:18 -0700 (Fri, 21 Mar 2008)

Log Message:
-----------
unify the unit tests

For the moment, central running of them breaks
because of multiple initialization of R
(fix in progress)

Modified Paths:
--------------
    branches/rpy_nextgen/rpy/rinterface/tests/test_Sexp.py
    branches/rpy_nextgen/rpy/rinterface/tests/test_SexpEnvironment.py
    branches/rpy_nextgen/rpy/rinterface/tests/test_SexpVector.py
    branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py
    branches/rpy_nextgen/setup.py

Added Paths:
-----------
    branches/rpy_nextgen/rpy/rinterface/__init__.py
    branches/rpy_nextgen/rpy/rinterface/tests/__init__.py
    branches/rpy_nextgen/rpy/robjects/tests/__init__.py
    branches/rpy_nextgen/rpy/tests.py

Added: branches/rpy_nextgen/rpy/rinterface/__init__.py
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/__init__.py                             
(rev 0)
+++ branches/rpy_nextgen/rpy/rinterface/__init__.py     2008-03-21 17:49:18 UTC 
(rev 453)
@@ -0,0 +1,2 @@
+from rpy2.rinterface.rinterface import *
+


Property changes on: branches/rpy_nextgen/rpy/rinterface/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/rpy_nextgen/rpy/rinterface/tests/__init__.py
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/tests/__init__.py                       
        (rev 0)
+++ branches/rpy_nextgen/rpy/rinterface/tests/__init__.py       2008-03-21 
17:49:18 UTC (rev 453)
@@ -0,0 +1,17 @@
+import unittest
+
+from . import test_SexpVector
+from . import test_SexpEnvironment
+from . import test_Sexp
+
+def suite():
+    suite_SexpVector = test_SexpVector.suite()
+    suite_SexpEnvironment = test_SexpEnvironment.suite()
+    suite_Sexp = test_Sexp.suite()
+    alltests = unittest.TestSuite([suite_SexpVector, suite_SexpEnvironment, 
suite_Sexp])
+    return alltests
+
+def main():
+    r = unittest.TestResult()
+    suite().run(r)
+    return r


Property changes on: branches/rpy_nextgen/rpy/rinterface/tests/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: branches/rpy_nextgen/rpy/rinterface/tests/test_Sexp.py
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/tests/test_Sexp.py      2008-03-21 
14:08:43 UTC (rev 452)
+++ branches/rpy_nextgen/rpy/rinterface/tests/test_Sexp.py      2008-03-21 
17:49:18 UTC (rev 453)
@@ -35,5 +35,9 @@
 
         self.assertRaises(LookupError, sexp.do_slot, "foo")       
 
+def suite():
+    suite = unittest.TestLoader().loadTestsFromTestCase(SexpTestCase)
+    return suite
+
 if __name__ == '__main__':
      unittest.main()

Modified: branches/rpy_nextgen/rpy/rinterface/tests/test_SexpEnvironment.py
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/tests/test_SexpEnvironment.py   
2008-03-21 14:08:43 UTC (rev 452)
+++ branches/rpy_nextgen/rpy/rinterface/tests/test_SexpEnvironment.py   
2008-03-21 17:49:18 UTC (rev 453)
@@ -35,5 +35,9 @@
         ok = isinstance(sfit_R, rinterface.SexpClosure)
         self.assertTrue(ok)
 
+def suite():
+    suite = 
unittest.TestLoader().loadTestsFromTestCase(SexpEnvironmentTestCase)
+    return suite
+
 if __name__ == '__main__':
      unittest.main()

Modified: branches/rpy_nextgen/rpy/rinterface/tests/test_SexpVector.py
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/tests/test_SexpVector.py        
2008-03-21 14:08:43 UTC (rev 452)
+++ branches/rpy_nextgen/rpy/rinterface/tests/test_SexpVector.py        
2008-03-21 17:49:18 UTC (rev 453)
@@ -165,5 +165,9 @@
         #letters_R[0] = rinterface.SexpVector(["z", ], rinterface.STRSXP)
         self.assertTrue(letters_R[0] == "z")
 
+def suite():
+    suite = unittest.TestLoader().loadTestsFromTestCase(SexpVectorTestCase)
+    return suite
+
 if __name__ == '__main__':
      unittest.main()

Added: branches/rpy_nextgen/rpy/robjects/tests/__init__.py
===================================================================
--- branches/rpy_nextgen/rpy/robjects/tests/__init__.py                         
(rev 0)
+++ branches/rpy_nextgen/rpy/robjects/tests/__init__.py 2008-03-21 17:49:18 UTC 
(rev 453)
@@ -0,0 +1,13 @@
+import unittest
+
+from . import testRobjects
+
+def suite():
+    suite_Robjects = testRobjects.suite()
+    alltests = unittest.TestSuite([suite_Robjects, ])
+    return alltests
+
+def main():
+    r = unittest.TestResult()
+    suite().run(r)
+    return r


Property changes on: branches/rpy_nextgen/rpy/robjects/tests/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py
===================================================================
--- branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py     2008-03-21 
14:08:43 UTC (rev 452)
+++ branches/rpy_nextgen/rpy/robjects/tests/testRobjects.py     2008-03-21 
17:49:18 UTC (rev 453)
@@ -87,5 +87,9 @@
 
         #FIXME: more tests
 
+def suite():
+    suite = unittest.TestLoader().loadTestsFromTestCase(RvectorTestCase)
+    return suite
+
 if __name__ == '__main__':
      unittest.main()

Added: branches/rpy_nextgen/rpy/tests.py
===================================================================
--- branches/rpy_nextgen/rpy/tests.py                           (rev 0)
+++ branches/rpy_nextgen/rpy/tests.py   2008-03-21 17:49:18 UTC (rev 453)
@@ -0,0 +1,13 @@
+import unittest
+
+import rpy2.robjects.tests
+import rpy2.rinterface.tests
+
+def suite():
+    suite_robjects = rpy2.robjects.tests.suite()
+    suite_rinterface = rpy2.rinterface.tests.suite()
+    alltests = unittest.TestSuite([suite_robjects, ])
+    return alltests
+
+if __name__ == "__main__":
+    unittest.main(defaultTest = "suite")


Property changes on: branches/rpy_nextgen/rpy/tests.py
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: branches/rpy_nextgen/setup.py
===================================================================
--- branches/rpy_nextgen/setup.py       2008-03-21 14:08:43 UTC (rev 452)
+++ branches/rpy_nextgen/setup.py       2008-03-21 17:49:18 UTC (rev 453)
@@ -22,7 +22,7 @@
 
 
     rinterface = Extension(
-            "rpy2.rinterface",
+            "rpy2.rinterface.rinterface",
             ["rpy/rinterface/rinterface.c", ],
             include_dirs=[ os.path.join(RHOME, 'include'),],
             libraries=['R', 'Rlapack', 'Rblas'],
@@ -38,7 +38,8 @@
           license="(L)GPL",
           ext_modules = [rinterface],
           package_dir = {'rpy2': 'rpy'},
-          packages = ['rpy2', 'rpy2.robjects']
+          packages = ['rpy2', 'rpy2.robjects', 'rpy2.robjects.tests',
+                      'rpy2.rinterface', 'rpy2.rinterface.tests']
           )
 
 


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

Reply via email to