Ejemplo n.º 1
0
 def foo(queue):
     import rpy3.rinterface as rinterface
     rinterface.endr(1)
     try:
         tmp = ri.SexpVector([1,2], ri.INTSXP)
         res = (False, None)
     except RuntimeError, re:
         res = (True, re)
Ejemplo n.º 2
0
 def foo(queue):
     import rpy3.rinterface as rinterface
     rdate = rinterface.baseenv['date']
     rinterface.endr(1)
     try:
         tmp = rdate()
         res = (False, None)
     except RuntimeError, re:
         res = (True, re)
Ejemplo n.º 3
0
 def testCallErrorWhenEndedR(self):
     self.assertTrue(False) # worked when tested, but calling endEmbeddedR causes trouble
     t = rinterface.baseNameSpaceEnv['date']
     rinterface.endr(1)
     self.assertRaises(RuntimeError, t)
     rinterface.initr()
Ejemplo n.º 4
0
 def testNewWithoutInit(self):
     self.assertTrue(False) # worked when tested, but calling endEmbeddedR causes trouble
     ri.endr(1)
     self.assertRaises(RuntimeError, ri.SexpVector, [1,2], ri.INTSXP)
     #FIXME: trouble... does not initialize R when failing the test
     ri.initr()