forked from orbit-oss/flask
Merge pull request #2148 from drewja/master
Added python3.6 support for tests
This commit is contained in:
commit
22c613b8c4
4 changed files with 9 additions and 5 deletions
|
|
@ -8,6 +8,7 @@ python:
|
|||
- "3.3"
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
|
||||
env:
|
||||
- REQUIREMENTS=lowest
|
||||
|
|
@ -32,7 +33,10 @@ matrix:
|
|||
env: REQUIREMENTS=lowest
|
||||
- python: "3.5"
|
||||
env: REQUIREMENTS=lowest-simplejson
|
||||
|
||||
- python: "3.6"
|
||||
env: REQUIREMENTS=lowest
|
||||
- python: "3.6"
|
||||
env: REQUIREMENTS=lowest-simplejson
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ def test_session_expiration():
|
|||
client = app.test_client()
|
||||
rv = client.get('/')
|
||||
assert 'set-cookie' in rv.headers
|
||||
match = re.search(r'\bexpires=([^;]+)(?i)', rv.headers['set-cookie'])
|
||||
match = re.search(r'(?i)\bexpires=([^;]+)', rv.headers['set-cookie'])
|
||||
expires = parse_date(match.group())
|
||||
expected = datetime.utcnow() + app.permanent_session_lifetime
|
||||
assert expires.year == expected.year
|
||||
|
|
|
|||
|
|
@ -179,8 +179,8 @@ def test_flaskext_broken_package_no_module_caching(flaskext_broken):
|
|||
def test_no_error_swallowing(flaskext_broken):
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
import flask.ext.broken
|
||||
|
||||
assert excinfo.type is ImportError
|
||||
# python3.6 raises a subclass of ImportError: 'ModuleNotFoundError'
|
||||
assert issubclass(excinfo.type, ImportError)
|
||||
if PY2:
|
||||
message = 'No module named missing_module'
|
||||
else:
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = {py26,py27,pypy}-{lowest,release,devel}{,-simplejson}, {py33,py34,py35}-{release,devel}{,-simplejson}
|
||||
envlist = {py26,py27,pypy}-{lowest,release,devel}{,-simplejson}, {py33,py34,py35,py36}-{release,devel}{,-simplejson}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue