def testNewReadPutInt(self): vgd0ptr = self._newReadBcmk() v1 = 6 vgd.vgd_put(vgd0ptr, 'IG_1', v1) v2 = vgd.vgd_get(vgd0ptr, 'IG_1') self.assertEqual(v1,v2)
def testNewReadPutChar(self): vgd0ptr = self._newReadBcmk() v1 = 'PRES' vgd.vgd_put(vgd0ptr, 'ETIK', v1) v2 = vgd.vgd_get(vgd0ptr, 'ETIK') self.assertEqual(v2.strip(),v1)
def testNewReadPutDouble(self): vgd0ptr = self._newReadBcmk() v1 = 70000. vgd.vgd_put(vgd0ptr, 'PREF', v1) v2 = vgd.vgd_get(vgd0ptr, 'PREF') self.assertEqual(int(v2*100.),int(v1*100.))
def testNewReadPutChar(self): vgd0ptr = self._newReadBcmk() v1 = 'PRES' vgd.vgd_put(vgd0ptr, 'RFLD', v1) v2 = vgd.vgd_get(vgd0ptr, 'RFLD') self.assertEqual(v2.strip(),v1)
def testNewCopy(self): vgd0ptr = self._newReadBcmk() vgd1ptr = vgd.vgd_copy(vgd0ptr) ok = vgd.vgd_cmp(vgd0ptr,vgd1ptr) self.assertTrue(ok) vgd.vgd_put(vgd1ptr, 'RFLD', 'PRES') ok = vgd.vgd_cmp(vgd0ptr,vgd1ptr) self.assertFalse(ok)