Tests: style.
This commit is contained in:
@@ -24,8 +24,8 @@ class TestApplicationGo(TestApplicationProto):
|
||||
env['GOCACHE'] = cache_dir
|
||||
|
||||
shutil.copy2(
|
||||
option.test_dir + '/go/' + script + '/' + name + '.go',
|
||||
temp_dir)
|
||||
option.test_dir + '/go/' + script + '/' + name + '.go', temp_dir
|
||||
)
|
||||
|
||||
if static:
|
||||
args = [
|
||||
@@ -55,7 +55,8 @@ class TestApplicationGo(TestApplicationProto):
|
||||
f"""module test/app
|
||||
require unit.nginx.org/go v0.0.0
|
||||
replace unit.nginx.org/go => {replace_path}
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
if option.detailed:
|
||||
print("\n$ GOPATH=" + env['GOPATH'] + " " + " ".join(args))
|
||||
|
||||
@@ -43,7 +43,11 @@ class TestApplicationWebsocket(TestApplicationProto):
|
||||
'Sec-WebSocket-Version': 13,
|
||||
}
|
||||
|
||||
_, sock = self.get(headers=headers, no_recv=True, start=True,)
|
||||
_, sock = self.get(
|
||||
headers=headers,
|
||||
no_recv=True,
|
||||
start=True,
|
||||
)
|
||||
|
||||
resp = ''
|
||||
while True:
|
||||
@@ -218,9 +222,7 @@ class TestApplicationWebsocket(TestApplicationProto):
|
||||
while pos < message_len:
|
||||
end = min(pos + fragmention_size, message_len)
|
||||
fin = end == message_len
|
||||
self.frame_write(
|
||||
sock, op_code, message[pos:end], fin=fin, **kwargs
|
||||
)
|
||||
self.frame_write(sock, op_code, message[pos:end], fin=fin, **kwargs)
|
||||
op_code = self.OP_CONT
|
||||
pos = end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user