Пример #1
0
 def test_acquire(self):
     pidfile = pep3143daemon.pidfile.PidFile(self.pidfile)
     pidfile.acquire()
     self.assertIsInstance(pidfile.pidfile, _io.TextIOWrapper)
     self.assertEqual(pidfile.pidfile.name, self.pidfile)
     self.assertFalse(pidfile.pidfile.closed)
     pidfile.release()
Пример #2
0
 def test_release(self):
     pidfile = pep3143daemon.pidfile.PidFile(self.pidfile)
     pidfile.acquire()
     pidfile.release()
     self.assertTrue(pidfile.pidfile.closed)