Skip to content

Commit 7a1094a

Browse files
committed
fix Sanic test
1 parent 93ca341 commit 7a1094a

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

requirements_dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ bumpversion==0.5.3 # pyup: update minor
55
wheel==0.33.0 # pyup: update minor
66
cryptography==2.7 # pyup: update minor
77
psycopg2-binary==2.8.1 # pyup: update minor
8-
sanic==19.3.1 # pyup: update minor
9-
aiohttp==3.6.0 # pyup: update minor
8+
sanic==19.3.1;python_version>="3.6" # pyup: update minor
9+
aiohttp==3.6.0;python_version>="3.5.3" # pyup: update minor
1010
tornado==6.0 # pyup: update minor
1111
async_generator==1.10 # pyup: update minor
1212
quart==0.10.0;python_version>="3.7" # pyup: update minor

tests/test_sanic.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
from async_generator import yield_, async_generator
55
import pytest
6+
7+
# Sanic 19.6 dropped Python 3.5 support
8+
if sys.version_info < (3, 6):
9+
raise pytest.skip(allow_module_level=True)
10+
611
import sanic
712
from sanic.response import text, json
813

@@ -12,8 +17,6 @@
1217
from .models import DB_ARGS, PG_URL
1318

1419
_MAX_INACTIVE_CONNECTION_LIFETIME = 59.0
15-
pytestmark = pytest.mark.skipif(sys.version_info < (3, 6),
16-
reason="Sanic 19.6 dropped Python 3.5 support")
1720

1821

1922
def teardown_module():

0 commit comments

Comments
 (0)