Example #1
0
def test_make_pid_file_path():
    path = unix.make_pid_file_path("testing")
    assert_equal(path, "/var/run/testing.pid")
    path = unix.make_pid_file_path("testing", pid_file_path="/var/run/stuff")
    assert_equal(path, "/var/run/stuff/testing.pid")
Example #2
0
def test_make_pid_file_path():
    path = unix.make_pid_file_path("testing")
    assert_equal(path, "/var/run/testing.pid")
    path = unix.make_pid_file_path("testing", pid_file_path="/var/run/stuff")
    assert_equal(path, "/var/run/stuff/testing.pid")
Example #3
0
 def clear_pid(self):
     try:
         os.remove(unix.make_pid_file_path(self.name))
     except OSError:
         pass
     sys.exit(0)