Skip to content

Commit 659056f

Browse files
Reenable Windows tests (#329)
* Reenable Windows tests * try hack to fix grablib logging (#335) * windows tests passing incorrectly * Use async with * Ignore python internal warnings Co-authored-by: Samuel Colvin <[email protected]>
1 parent 88b7477 commit 659056f

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
strategy:
5959
matrix:
6060
pyver: [3.6, 3.7, 3.8, 3.9]
61-
os: [ubuntu, macos]
61+
os: [ubuntu, macos, windows]
6262
#include:
6363
# - pyver: pypy3
6464
# os: ubuntu
@@ -88,12 +88,13 @@ jobs:
8888
path: requirements-dev.txt
8989
- name: Install JS dependencies
9090
run: grablib
91+
env:
92+
PYTHONIOENCODING: 'utf-8'
9193
- name: Run unittests
94+
run: pytest
9295
env:
9396
COLOR: 'yes'
94-
run: |
95-
pytest
96-
python -m coverage xml
97+
- run: python -m coverage xml
9798
- name: Upload coverage
9899
uses: codecov/codecov-action@v1
99100
with:

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ markers = boxed: mark tests as boxed
44
testpaths = tests/
55
filterwarnings =
66
error
7+
ignore:The loop argument is deprecated:DeprecationWarning:asyncio.base_events
78
xfail_strict = true
89

910
[flake8]

tests/test_runserver_main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ async def test_aux_app(tmpworkdir, aiohttp_client):
134134
'test.txt': 'test value',
135135
})
136136
app = create_auxiliary_app(static_path='.')
137-
cli = await aiohttp_client(app)
138-
r = await cli.get('/test.txt')
139-
assert r.status == 200
140-
text = await r.text()
137+
async with await aiohttp_client(app) as cli:
138+
async with cli.get('/test.txt') as r:
139+
assert r.status == 200
140+
text = await r.text()
141141
assert text == 'test value'
142142

143143

0 commit comments

Comments
 (0)