diff --git a/Makefile b/Makefile index 367fb16de46..4cd4fe3e7c9 100644 --- a/Makefile +++ b/Makefile @@ -60,21 +60,21 @@ check_changes: @touch .develop test: .develop - @pytest -c pytest.ci.ini -q + @pytest -q vtest: .develop - @pytest -c pytest.ci.ini -s -v + @pytest -s -v cov cover coverage: tox cov-dev: .develop - @pytest -c pytest.ci.ini --cov-report=html + @pytest --cov-report=html @echo "open file://`pwd`/htmlcov/index.html" cov-ci-run: .develop @echo "Regular run" - @pytest -c pytest.ci.ini --cov-report=html + @pytest --cov-report=html cov-dev-full: cov-ci-run @echo "open file://`pwd`/htmlcov/index.html" diff --git a/pytest.ci.ini b/pytest.ci.ini deleted file mode 100644 index 0d334099e26..00000000000 --- a/pytest.ci.ini +++ /dev/null @@ -1,9 +0,0 @@ -[pytest] -addopts = --cov=aiohttp --cov-report term-missing:skip-covered --cov-report xml --junitxml=.test-results/pytest/results.xml -v -rxXs --durations 10 -filterwarnings = - error - ignore:module 'ssl' has no attribute 'OP_NO_COMPRESSION'. The Python interpreter is compiled against OpenSSL < 1.0.0. Ref. https.//docs.python.org/3/library/ssl.html#ssl.OP_NO_COMPRESSION:UserWarning -junit_suite_name = aiohttp_test_suite -norecursedirs = dist docs build .tox .eggs -minversion = 3.8.2 -testpaths = tests/ diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index bb280dcd3a4..00000000000 --- a/pytest.ini +++ /dev/null @@ -1,9 +0,0 @@ -[pytest] -addopts = --cov=aiohttp -v -rxXs -filterwarnings = - error - ignore:module 'ssl' has no attribute 'OP_NO_COMPRESSION'. The Python interpreter is compiled against OpenSSL < 1.0.0. Ref. https.//docs.python.org/3/library/ssl.html#ssl.OP_NO_COMPRESSION:UserWarning -junit_suite_name = aiohttp_test_suite -norecursedirs = dist docs build .tox .eggs -minversion = 3.8.2 -testpaths = tests/ diff --git a/setup.cfg b/setup.cfg index 5e3f402c7ad..bab0cc951d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,6 +33,17 @@ branch = True source = aiohttp, tests omit = site-packages +[tool:pytest] +addopts = --cov=aiohttp -v -rxXs --durations 10 +filterwarnings = + error + ignore:module 'ssl' has no attribute 'OP_NO_COMPRESSION'. The Python interpreter is compiled against OpenSSL < 1.0.0. Ref. https.//docs.python.org/3/library/ssl.html#ssl.OP_NO_COMPRESSION:UserWarning +junit_suite_name = aiohttp_test_suite +norecursedirs = dist docs build .tox .eggs +minversion = 3.8.2 +testpaths = tests/ +junit_family=xunit2 + [mypy] follow_imports = silent strict_optional = True diff --git a/tests/test_web_request.py b/tests/test_web_request.py index 704704c2fd0..bc352276476 100644 --- a/tests/test_web_request.py +++ b/tests/test_web_request.py @@ -62,7 +62,7 @@ def test_ctor() -> None: assert 'GET' == req.method assert HttpVersion(1, 1) == req.version # MacOS may return CamelCased host name, need .lower() - assert req.host == socket.getfqdn().lower() + assert req.host.lower() == socket.getfqdn().lower() assert '/path/to?a=1&b=2' == req.path_qs assert '/path/to' == req.path assert 'a=1&b=2' == req.query_string