From 3c4a280e14a18307f5747209978d260a1e0fea46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Wed, 1 Apr 2020 11:59:01 +0300 Subject: [PATCH] Use different test server ports to avoid binding problems on Windows. --- tests/test_auto_reload.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_auto_reload.py b/tests/test_auto_reload.py index 09d698c2..fa079c8f 100644 --- a/tests/test_auto_reload.py +++ b/tests/test_auto_reload.py @@ -24,21 +24,20 @@ def write_app(filename, **runargs): started = True print("complete", {text!r}) - kwargs = {runargs!r} try: - app.run(port=42101, **kwargs) + app.run(**{runargs!r}) except Exception as e: print("complete", repr(e)) else: if not started: - print("complete SERVER DID NOT START") + print("complete DID NOT START") """ )) return text -@pytest.mark.parametrize("runargs", [ - dict(auto_reload=True), - dict(debug=True), +@pytest.mark.parametrize("runargs,port", [ + dict(port=42102, auto_reload=True), + dict(port=42103, debug=True), ]) async def test_reloader_live(runargs): with TemporaryDirectory() as tmpdir: