The break keyword in most programs, including Godot, stops the execution of an if statement or a for, while or any iterative loop. To ‘break’ out of a function, just use the return keyword.
func _ready():
if some_condition:
print("true")
else:
return # breaks execution of the entire function
print("test")
Please note that according to your code fragment, this would either print out both true and test, or neither at all.