From c14f5e46455d0027548438414f6bd3278f8fd288 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Mon, 23 Aug 2021 21:02:14 +0100 Subject: [PATCH 1/5] Reenable Windows tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92031306..ab69cb05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: strategy: matrix: pyver: [3.6, 3.7] - os: [ubuntu, macos] + os: [ubuntu, macos, windows] #include: # - pyver: pypy3 # os: ubuntu From b6a2cad71c20520c50087e04881fd79c9edd1e19 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Sun, 12 Sep 2021 14:25:46 +0100 Subject: [PATCH 2/5] try hack to fix grablib logging (#335) --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4814fc4f..f8213287 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,8 @@ jobs: path: requirements-dev.txt - name: Install JS dependencies run: grablib + env: + PYTHONIOENCODING: 'utf-8' - name: Run unittests env: COLOR: 'yes' From 154e1ee9fcfe7a0b548386d68c4156755cf91a3f Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Sun, 12 Sep 2021 14:34:26 +0100 Subject: [PATCH 3/5] windows tests passing incorrectly --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8213287..c562bcd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,11 +91,10 @@ jobs: 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: From 9fe10316d829065adf565ff3fa1991c295d268a0 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sun, 12 Sep 2021 19:03:06 +0100 Subject: [PATCH 4/5] Use async with --- tests/test_runserver_main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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' From 07439a0c5f756985176fef11c30da737ff6b9e94 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sun, 12 Sep 2021 19:06:23 +0100 Subject: [PATCH 5/5] Ignore python internal warnings --- setup.cfg | 1 + 1 file changed, 1 insertion(+) 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]