def test3(self): remote = RemoteCodeInterface() var = new_plummer_model(100) remote.assign("var", var) var_ = remote.evaluate("var.mass") self.assertEqual(var_, var.mass)
def test3(self): remote=RemoteCodeInterface() var=new_plummer_model(100) remote.assign("var",var) var_=remote.evaluate("var.mass") self.assertEqual(var_,var.mass)
def test1(self): remote = RemoteCodeInterface() var = 123 remote.assign("var", var) var_ = remote.evaluate("var+1") self.assertEqual(var_, var + 1) remote.execute("var=var*2") var_ = remote.evaluate("var") self.assertEqual(var_, var * 2)
def test4(self): self.check_not_in_mpiexec() remote = RemoteCodeInterface(channel_type="sockets") var = 123 remote.assign("var", var) var_ = remote.evaluate("var+1") self.assertEqual(var_, var + 1) remote.execute("var=var*2") var_ = remote.evaluate("var") self.assertEqual(var_, var * 2)
def test1(self): remote=RemoteCodeInterface() var=123 remote.assign("var",var) var_=remote.evaluate("var+1") self.assertEqual(var_,var+1) remote.execute("var=var*2") var_=remote.evaluate("var") self.assertEqual(var_,var*2)
def test4(self): self.check_not_in_mpiexec() remote=RemoteCodeInterface(channel_type="sockets") var=123 remote.assign("var",var) var_=remote.evaluate("var+1") self.assertEqual(var_,var+1) remote.execute("var=var*2") var_=remote.evaluate("var") self.assertEqual(var_,var*2)
def test2(self): remote=RemoteCodeInterface() from math import sqrt result=remote.func(sqrt, 64) self.assertEqual(result,8)
def test2(self): remote = RemoteCodeInterface() from math import sqrt result = remote.func(sqrt, 64) self.assertEqual(result, 8)