Report failures in test_auto_reload to avoid timeouts.
This commit is contained in:
parent
613086ac7d
commit
58a122671d
@ -16,13 +16,22 @@ def write_app(filename, **runargs):
|
|||||||
from sanic.response import text
|
from sanic.response import text
|
||||||
|
|
||||||
app = Sanic(__name__)
|
app = Sanic(__name__)
|
||||||
|
started = False
|
||||||
|
|
||||||
@app.listener("after_server_start")
|
@app.listener("after_server_start")
|
||||||
def complete(*args):
|
def complete(*args):
|
||||||
|
global started
|
||||||
|
started = True
|
||||||
print("complete", {text!r})
|
print("complete", {text!r})
|
||||||
|
|
||||||
kwargs = {runargs!r}
|
kwargs = {runargs!r}
|
||||||
|
try:
|
||||||
app.run(port=42101, **kwargs)
|
app.run(port=42101, **kwargs)
|
||||||
|
except Exception as e:
|
||||||
|
print("complete", repr(e))
|
||||||
|
else:
|
||||||
|
if not started:
|
||||||
|
print("complete SERVER DID NOT START")
|
||||||
"""
|
"""
|
||||||
))
|
))
|
||||||
return text
|
return text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user