|
@@ -435,11 +435,12 @@ class TestPIDFile(unittest.TestCase):
|
|
open(self.pid_file, "w").write('dummy data\n')
|
|
open(self.pid_file, "w").write('dummy data\n')
|
|
self.check_pid_file()
|
|
self.check_pid_file()
|
|
|
|
|
|
- def test_dump_pid_notexist(self):
|
|
|
|
|
|
+ def test_unlink_pid_file_notexist(self):
|
|
dummy_data = 'dummy_data\n'
|
|
dummy_data = 'dummy_data\n'
|
|
open(self.pid_file, "w").write(dummy_data)
|
|
open(self.pid_file, "w").write(dummy_data)
|
|
- dump_pid('no_such_pid_file')
|
|
|
|
- # the original content of the file should be intact.
|
|
|
|
|
|
+ unlink_pid_file("no_such_pid_file")
|
|
|
|
+ # the file specified for unlink_pid_file doesn't exist,
|
|
|
|
+ # and the original content of the file should be intact.
|
|
self.assertEqual(dummy_data, open(self.pid_file, "r").read())
|
|
self.assertEqual(dummy_data, open(self.pid_file, "r").read())
|
|
|
|
|
|
def test_dump_pid_with_none(self):
|
|
def test_dump_pid_with_none(self):
|