Boost test speed by pytest-xdist

This commit is contained in:
Jeong YunWon
2017-11-28 03:56:05 +09:00
committed by Jeong YunWon
parent 72254a7af9
commit a8827a5d95
11 changed files with 58 additions and 31 deletions

View File

@@ -3,7 +3,7 @@ import random
import signal
from sanic import Sanic
from sanic.testing import HOST, PORT
from sanic.testing import HOST
def test_multiprocessing():
@@ -20,7 +20,7 @@ def test_multiprocessing():
signal.signal(signal.SIGALRM, stop_on_alarm)
signal.alarm(1)
app.run(HOST, PORT, workers=num_workers)
app.run(HOST, app.test_port, workers=num_workers)
assert len(process_list) == num_workers