This commit is contained in:
meejah 2022-09-15 21:58:20 -06:00
parent 642b604753
commit 82c72ddede
2 changed files with 4 additions and 14 deletions

View File

@ -17,22 +17,14 @@ from six.moves import (
StringIO,
)
from testtools import (
skipIf,
)
from hypothesis.strategies import text
from hypothesis import given, assume
from testtools.matchers import (
Contains,
Equals,
HasLength,
)
from twisted.python.runtime import (
platform,
)
from twisted.python.filepath import (
FilePath,
)
@ -184,10 +176,8 @@ class RunTests(SyncTestCase):
)
# because the pidfile is invalid we shouldn't get to the
# .run() call itself.
self.assertThat(
runs,
Equals([])
)
self.assertThat(runs, Equals([]))
self.assertThat(result_code, Equals(1))
good_file_content_re = re.compile(r"\w[0-9]*\w[0-9]*\w")

View File

@ -50,11 +50,11 @@ def check_pid_process(pidfile, find_process=None):
)
try:
# if any other process is running at that PID, let the
# user decide if this is another magic-older
# user decide if this is another legitimate
# instance. Automated programs may use the start-time to
# help decide this (if the PID is merely recycled, the
# start-time won't match).
proc = find_process(pid)
find_process(pid)
raise ProcessInTheWay(
"A process is already running as PID {}".format(pid)
)