diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30f3c436..c562bcd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: strategy: matrix: pyver: [3.6, 3.7, 3.8, 3.9] - os: [ubuntu, macos] + os: [ubuntu, macos, windows] #include: # - pyver: pypy3 # os: ubuntu @@ -88,12 +88,13 @@ jobs: path: requirements-dev.txt - name: Install JS dependencies run: grablib + env: + PYTHONIOENCODING: 'utf-8' - name: Run unittests + run: pytest env: COLOR: 'yes' - run: | - pytest - python -m coverage xml + - run: python -m coverage xml - name: Upload coverage uses: codecov/codecov-action@v1 with: diff --git a/setup.cfg b/setup.cfg index 662e897c..7c89265c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,6 +4,7 @@ markers = boxed: mark tests as boxed testpaths = tests/ filterwarnings = error + ignore:The loop argument is deprecated:DeprecationWarning:asyncio.base_events xfail_strict = true [flake8] diff --git a/tests/test_runserver_main.py b/tests/test_runserver_main.py index f9c93b19..00f31ef7 100644 --- a/tests/test_runserver_main.py +++ b/tests/test_runserver_main.py @@ -134,10 +134,10 @@ async def test_aux_app(tmpworkdir, aiohttp_client): 'test.txt': 'test value', }) app = create_auxiliary_app(static_path='.') - cli = await aiohttp_client(app) - r = await cli.get('/test.txt') - assert r.status == 200 - text = await r.text() + async with await aiohttp_client(app) as cli: + async with cli.get('/test.txt') as r: + assert r.status == 200 + text = await r.text() assert text == 'test value'