def test_rAssign_method(): 'test "rAssign" class method of RSerializer' hexd = ( "\x20\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x00\x00\x76\x00" "\x00\x00\x0a\x08\x00\x00\x20\x04\x00\x00\x01\x00\x00\x00" ) assert rserializer.rAssign("v", 1) == hexd
def test_rAssign_method(): 'test "rAssign" class method of RSerializer' hexd = '\x20\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x00\x00\x76\x00'\ '\x00\x00\x0a\x08\x00\x00\x20\x04\x00\x00\x01\x00\x00\x00' assert rserializer.rAssign('v', 1) == hexd
def setRexp(self, name, o): '@brief Convert a python object into an RExp and bind it to a variable called "name" in the R namespace' rAssign(name, o, self.sock) # Rserv sends an emtpy confirmation message, or error message in case of an error. # rparse() will raise an Exception in the latter case. rparse(self.sock, atomicArray=self.atomicArray)