Commit a663b567 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac606] corrected a test case. it was intended to test the unlink behavior,

but the original test code was wrong and didn't make sense.
parent 4cf5938f
......@@ -435,11 +435,12 @@ class TestPIDFile(unittest.TestCase):
open(self.pid_file, "w").write('dummy data\n')
self.check_pid_file()
def test_dump_pid_notexist(self):
def test_unlink_pid_file_notexist(self):
dummy_data = 'dummy_data\n'
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())
def test_dump_pid_with_none(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment