Indent every script with tabs, like the Godot editor does

This commit is contained in:
Sansan committed 2026-10-06 10:28:12 +02:00
1 parent 8c1987807c
commit bad4b3ad8b
35 files changed
+1653 -1653

No files matched your search

+24 -24
View File
@@ -8,41 +8,41 @@ var _owner: Node
func before_test() -> void:
_server = TCPServer.new()
assert_int(_server.listen(0, "127.0.0.1")).is_equal(OK)
_owner = auto_free(Node.new())
add_child(_owner)
_server = TCPServer.new()
assert_int(_server.listen(0, "127.0.0.1")).is_equal(OK)
_owner = auto_free(Node.new())
add_child(_owner)
func after_test() -> void:
for connection: StreamPeerTCP in _connections:
connection.disconnect_from_host()
_server.stop()
for connection: StreamPeerTCP in _connections:
connection.disconnect_from_host()
_server.stop()
func _accept_connections() -> void:
while _server.is_connection_available():
_connections.append(_server.take_connection())
while _server.is_connection_available():
_connections.append(_server.take_connection())
func test_request_to_silent_server_times_out_as_failed() -> void:
var transport: HttpTransport = HttpTransport.new(_owner)
transport.timeout_seconds = 0.5
var response_codes: Array[int] = []
var transport: HttpTransport = HttpTransport.new(_owner)
transport.timeout_seconds = 0.5
var response_codes: Array[int] = []
transport.request("http://127.0.0.1:%d/music/rand" % _server.get_local_port(),
HTTPClient.METHOD_GET,
func(response_code: int, _body: PackedByteArray) -> void:
response_codes.append(response_code))
for i: int in 40:
_accept_connections()
await await_millis(50)
if !response_codes.is_empty():
break
transport.request("http://127.0.0.1:%d/music/rand" % _server.get_local_port(),
HTTPClient.METHOD_GET,
func(response_code: int, _body: PackedByteArray) -> void:
response_codes.append(response_code))
for i: int in 40:
_accept_connections()
await await_millis(50)
if !response_codes.is_empty():
break
assert_bool(_connections.is_empty()).is_false()
assert_array(response_codes).contains_exactly([0])
assert_bool(_connections.is_empty()).is_false()
assert_array(response_codes).contains_exactly([0])
func test_default_timeout_is_set() -> void:
assert_float(HttpTransport.new(_owner).timeout_seconds).is_greater(0.0)
assert_float(HttpTransport.new(_owner).timeout_seconds).is_greater(0.0)