cleanup
This commit is contained in:
parent
642b604753
commit
82c72ddede
|
@ -17,22 +17,14 @@ from six.moves import (
|
||||||
StringIO,
|
StringIO,
|
||||||
)
|
)
|
||||||
|
|
||||||
from testtools import (
|
|
||||||
skipIf,
|
|
||||||
)
|
|
||||||
|
|
||||||
from hypothesis.strategies import text
|
from hypothesis.strategies import text
|
||||||
from hypothesis import given, assume
|
from hypothesis import given, assume
|
||||||
|
|
||||||
from testtools.matchers import (
|
from testtools.matchers import (
|
||||||
Contains,
|
Contains,
|
||||||
Equals,
|
Equals,
|
||||||
HasLength,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from twisted.python.runtime import (
|
|
||||||
platform,
|
|
||||||
)
|
|
||||||
from twisted.python.filepath import (
|
from twisted.python.filepath import (
|
||||||
FilePath,
|
FilePath,
|
||||||
)
|
)
|
||||||
|
@ -184,10 +176,8 @@ class RunTests(SyncTestCase):
|
||||||
)
|
)
|
||||||
# because the pidfile is invalid we shouldn't get to the
|
# because the pidfile is invalid we shouldn't get to the
|
||||||
# .run() call itself.
|
# .run() call itself.
|
||||||
self.assertThat(
|
self.assertThat(runs, Equals([]))
|
||||||
runs,
|
self.assertThat(result_code, Equals(1))
|
||||||
Equals([])
|
|
||||||
)
|
|
||||||
|
|
||||||
good_file_content_re = re.compile(r"\w[0-9]*\w[0-9]*\w")
|
good_file_content_re = re.compile(r"\w[0-9]*\w[0-9]*\w")
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,11 @@ def check_pid_process(pidfile, find_process=None):
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
# if any other process is running at that PID, let the
|
# 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
|
# instance. Automated programs may use the start-time to
|
||||||
# help decide this (if the PID is merely recycled, the
|
# help decide this (if the PID is merely recycled, the
|
||||||
# start-time won't match).
|
# start-time won't match).
|
||||||
proc = find_process(pid)
|
find_process(pid)
|
||||||
raise ProcessInTheWay(
|
raise ProcessInTheWay(
|
||||||
"A process is already running as PID {}".format(pid)
|
"A process is already running as PID {}".format(pid)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue