Ejemplo n.º 1
0
 def test_close_FAIL_if_safelock_is_true(self):
     datafile = 'test.vok'
     lection = Vokker()
     lection.open(datafile)
     lection._safelock = True
     rt = lection.close()
     self.assertFalse(rt, "safelock is activ")
     lection._file_handle.close()
Ejemplo n.º 2
0
    def test_open_FAIL_if_safelock_is_true(self):
        datafile = 'test.vok'
        lec = Vokker()
        lec._safelock = True
        rt = lec.open(datafile)

        self.assertFalse(rt, "File opened, but safelock is True")
        lec.close()
Ejemplo n.º 3
0
 def test_close_FAIL_if_non_opened_file(self):
     l = Vokker()
     l._safelock = True
     rt = l.close()
     self.assertFalse(rt, "unable to close non-opened file!!! ")