Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
 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.))
Exemple #4
0
 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)
Exemple #5
0
    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)
Exemple #6
0
 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)