Fix test_fast when there's only one CPU (#2801)
Co-authored-by: Néstor Pérez <25409753+prryplatypus@users.noreply.github.com> Co-authored-by: Adam Hopkins <adam@amhopkins.com>
This commit is contained in:
parent
d255d1aae1
commit
eb3d78f687
|
@ -76,4 +76,10 @@ def test_fast(app: Sanic, caplog):
|
||||||
assert app.state.workers == workers
|
assert app.state.workers == workers
|
||||||
|
|
||||||
messages = [m[2] for m in caplog.record_tuples]
|
messages = [m[2] for m in caplog.record_tuples]
|
||||||
assert f"mode: production, goin' fast w/ {workers} workers" in messages
|
|
||||||
|
if workers == 1:
|
||||||
|
worker_fragment = "single worker"
|
||||||
|
else:
|
||||||
|
worker_fragment = f"w/ {workers} workers"
|
||||||
|
|
||||||
|
assert f"mode: production, goin' fast {worker_fragment}" in messages
|
||||||
|
|
Loading…
Reference in New Issue
Block a user