From fc18f86964e170c48632c614c86a0d26c9fbdd41 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Sat, 24 Oct 2020 23:03:25 +0300 Subject: [PATCH 1/3] Resolve broken test in appveyor --- tests/test_load_module_from_file_location.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_load_module_from_file_location.py b/tests/test_load_module_from_file_location.py index 979c2bc0..015ad256 100644 --- a/tests/test_load_module_from_file_location.py +++ b/tests/test_load_module_from_file_location.py @@ -10,7 +10,7 @@ from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( - str(Path(__file__).parent / "static/app_test_config.py") + str(Path(__file__).parent / "static" / "app_test_config.py") ) @@ -20,9 +20,7 @@ def test_load_module_from_file_location(loaded_module_from_file_location): @pytest.mark.dependency(depends=["test_load_module_from_file_location"]) -def test_loaded_module_from_file_location_name( - loaded_module_from_file_location, -): +def test_loaded_module_from_file_location_name(loaded_module_from_file_location,): assert loaded_module_from_file_location.__name__ == "app_test_config" From 96364aacc04d402ce8add0257792cb004f054171 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Sat, 24 Oct 2020 23:42:38 +0300 Subject: [PATCH 2/3] squash --- tests/test_load_module_from_file_location.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_load_module_from_file_location.py b/tests/test_load_module_from_file_location.py index 015ad256..5dc42d5c 100644 --- a/tests/test_load_module_from_file_location.py +++ b/tests/test_load_module_from_file_location.py @@ -21,7 +21,10 @@ def test_load_module_from_file_location(loaded_module_from_file_location): @pytest.mark.dependency(depends=["test_load_module_from_file_location"]) def test_loaded_module_from_file_location_name(loaded_module_from_file_location,): - assert loaded_module_from_file_location.__name__ == "app_test_config" + name = loaded_module_from_file_location.__name__ + if "C:\\" in name: + name = name.split("\\")[-1] + assert name == "app_test_config" def test_load_module_from_file_location_with_non_existing_env_variable(): From 7dbd3eb5e83ef5369a04040f8516e1740bd2edf2 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Sat, 24 Oct 2020 23:49:55 +0300 Subject: [PATCH 3/3] Update multidict version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e4ff74ee..f0351b91 100644 --- a/setup.py +++ b/setup.py @@ -80,13 +80,13 @@ requirements = [ ujson, "aiofiles>=0.3.0", "websockets>=8.1,<9.0", - "multidict>=4.0,<5.0", + "multidict==5.0.0", "httpx==0.15.4", ] tests_require = [ "pytest==5.2.1", - "multidict>=4.0,<5.0", + "multidict==5.0.0", "gunicorn", "pytest-cov", "httpcore==0.3.0",