diff options
| author | dianaclarke <diana.joan.clarke@gmail.com> | 2012-03-12 18:55:16 -0400 |
|---|---|---|
| committer | dianaclarke <diana.joan.clarke@gmail.com> | 2012-03-12 18:55:16 -0400 |
| commit | d67df81cbc1b4fafa967380b1f56ce5b33c604bc (patch) | |
| tree | 1a07c2c3ec48a19fded5e394ab8714dc5e0c2553 | |
| parent | d20324d1d55ae987985e52ee8ab8515857d57d6d (diff) | |
| download | pyramid-d67df81cbc1b4fafa967380b1f56ce5b33c604bc.tar.gz pyramid-d67df81cbc1b4fafa967380b1f56ce5b33c604bc.tar.bz2 pyramid-d67df81cbc1b4fafa967380b1f56ce5b33c604bc.zip | |
test the contents of the pid file in the exception cases
| -rw-r--r-- | pyramid/tests/test_scripts/test_pserve.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pyramid/tests/test_scripts/test_pserve.py b/pyramid/tests/test_scripts/test_pserve.py index 534bb37aa..c1b91e3ae 100644 --- a/pyramid/tests/test_scripts/test_pserve.py +++ b/pyramid/tests/test_scripts/test_pserve.py @@ -74,6 +74,8 @@ class TestPServeCommand(unittest.TestCase): 'Cannot remove PID file: (Some OSError - unlink)', 'Stale PID removed'] self._assert_pid_file_not_removed(msg=''.join(msg)) + with open(self.pid_file) as f: + self.assertEqual(f.read(), '') def test_remove_pid_file_stale_pid_write_exception(self): inst = self._makeOneWithPidFile(os.getpid()) @@ -84,6 +86,8 @@ class TestPServeCommand(unittest.TestCase): 'Stale PID left in file: %s ' % (self.pid_file), '(Some OSError - open)'] self._assert_pid_file_not_removed(msg=''.join(msg)) + with open(self.pid_file) as f: + self.assertEqual(int(f.read()), os.getpid()) def test_record_pid_verbose(self): self._assert_record_pid(verbosity=2, msg='Writing PID %d to %s') |
