Exemple #1
0
 def setUp(self):
     self.data = tempfile.mkdtemp()
     self.config = tempfile.mkdtemp()
     self.cache = tempfile.mkdtemp()
     self.appDirs = AppDirectories(self.data, self.config, self.cache)
     write_pid(self.appDirs)
Exemple #2
0
    def testReadPid(self):
        write_pid(self.appDirs)
        p = read_pid(self.appDirs)
        self.assertIsNotNone(p)

        self.assertEqual(getpid(), int(p))
Exemple #3
0
 def testDeletePid(self):
     write_pid(self.appDirs)
     delete_pid(self.appDirs)
     self.assertFalse(path.exists(path.join(self.appDirs.cache, "quikey.pid")))
Exemple #4
0
 def testWritePid(self):
     write_pid(self.appDirs)
     self.assertTrue(path.exists(path.join(self.appDirs.cache, "quikey.pid")))