diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index c0c6e7b4f99..60b6f456607 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -4,13 +4,15 @@ trigger: include: - master - ?.?* # matches to backport branches, e.g. 3.6 + tags: exclude: - - refs/tags/* + - '*' pr: autoCancel: true branches: include: - master + - ?.?* # matches to backport branches, e.g. 3.6 variables: - group: codecov diff --git a/.azure-pipelines/stage-test.yml b/.azure-pipelines/stage-test.yml index 0bbab56a813..5bf06df19d7 100644 --- a/.azure-pipelines/stage-test.yml +++ b/.azure-pipelines/stage-test.yml @@ -77,9 +77,12 @@ stages: - script: | pytest tests -vv - python -m coverage xml displayName: 'pytest' + - script: | + python -m coverage xml + displayName: 'Prepare coverage' + - script: | pip install codecov python -m codecov -f coverage.xml -X gcov diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py index 60217ab4107..6753a6d45d5 100644 --- a/tests/test_client_functional.py +++ b/tests/test_client_functional.py @@ -601,9 +601,9 @@ async def test_read_timeout_between_chunks(aiohttp_client, mocker) -> None: async def handler(request): resp = aiohttp.web.StreamResponse() await resp.prepare(request) - # write data 4 times, with pauses. Total time 0.4 seconds. + # write data 4 times, with pauses. Total time 2 seconds. for _ in range(4): - await asyncio.sleep(0.1) + await asyncio.sleep(0.5) await resp.write(b'data\n') return resp @@ -611,7 +611,7 @@ async def handler(request): app.add_routes([web.get('/', handler)]) # A timeout of 0.2 seconds should apply per read. - timeout = aiohttp.ClientTimeout(sock_read=0.2) + timeout = aiohttp.ClientTimeout(sock_read=1) client = await aiohttp_client(app, timeout=timeout) res = b'' diff --git a/tests/test_helpers.py b/tests/test_helpers.py index ca6059cb539..a6f96f38fca 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -203,7 +203,7 @@ class TestPyReify(ReifyMixin): reify = helpers.reify_py -if not helpers.NO_EXTENSIONS and not IS_PYPY: +if not helpers.NO_EXTENSIONS and not IS_PYPY and hasattr(helpers, 'reify_c'): class TestCReify(ReifyMixin): reify = helpers.reify_c