Skip to content

Commit 6f1c62d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 29cd595 commit 6f1c62d

3 files changed

Lines changed: 7 additions & 19 deletions

File tree

tests/test_functional_workflow.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
def test_functional_work_flow(testdir, tcp_port):
55
server_path = Path(__file__).parent.joinpath("server.py").absolute()
6-
testdir.makepyfile(
7-
"""
6+
testdir.makepyfile("""
87
import sys
98
import socket
109
from xprocess import ProcessStarter
@@ -29,9 +28,7 @@ class Starter(ProcessStarter):
2928
sock.sendall(bytes(data, "utf-8"))
3029
received = str(sock.recv(1024), "utf-8")
3130
assert received == data.upper()
32-
"""
33-
% (tcp_port, str(server_path))
34-
)
31+
""" % (tcp_port, str(server_path)))
3532
result = testdir.runpytest()
3633
result.stdout.fnmatch_lines("*1 passed*")
3734
result = testdir.runpytest("--xshow")

tests/test_interruption_clean_up.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
def test_interruption_cleanup(testdir, tcp_port):
55
server_path = Path(__file__).parent.joinpath("server.py").absolute()
6-
testdir.makepyfile(
7-
"""
6+
testdir.makepyfile("""
87
import sys
98
import socket
109
from xprocess import ProcessStarter
@@ -21,9 +20,7 @@ class Starter(ProcessStarter):
2120
xprocess.ensure("server_test_interrupt", Starter)
2221
2322
raise KeyboardInterrupt
24-
"""
25-
% (tcp_port, str(server_path))
26-
)
23+
""" % (tcp_port, str(server_path)))
2724
result = testdir.runpytest_subprocess()
2825
result.stdout.fnmatch_lines("*KeyboardInterrupt*")
2926
result = testdir.runpytest("--xshow")
@@ -32,8 +29,7 @@ class Starter(ProcessStarter):
3229

3330
def test_interruption_does_not_cleanup(testdir, tcp_port):
3431
server_path = Path(__file__).parent.joinpath("server.py").absolute()
35-
testdir.makepyfile(
36-
"""
32+
testdir.makepyfile("""
3733
import sys
3834
import socket
3935
from xprocess import ProcessStarter
@@ -49,9 +45,7 @@ class Starter(ProcessStarter):
4945
xprocess.ensure("server_test_interrupt_no_terminate", Starter)
5046
5147
raise KeyboardInterrupt
52-
"""
53-
% (tcp_port, str(server_path))
54-
)
48+
""" % (tcp_port, str(server_path)))
5549
result = testdir.runpytest_subprocess()
5650
result.stdout.fnmatch_lines("*KeyboardInterrupt*")
5751
result = testdir.runpytest("--xshow")

xprocess/xprocess.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import psutil
1616

17-
1817
XPROCESS_BLOCK_DELIMITER = "@@__xproc_block_delimiter__@@"
1918

2019

@@ -391,9 +390,7 @@ def wait_callback(self):
391390
raise TimeoutError(
392391
"The provided startup callback could not assert process\
393392
responsiveness within the specified time interval of {} \
394-
seconds".format(
395-
self.timeout
396-
)
393+
seconds".format(self.timeout)
397394
)
398395

399396
def wait(self, log_file):

0 commit comments

Comments
 (0)