Skip to content
Myr

Added python3.6 support for tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrew Arendt · committed by Andrew Arendt · parent 88111ae · Browse files · 4 files+9 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+9 added−5 removed

  • tests:+3 added−3 removed
  • other:+6 added−2 removed

4 files+9 added−5 removed

modified:tests/test_basic.py+1 added-1 removed
331 unmodified lines
332333 client = app.test_client()334 rv = client.get('/')335 assert 'set-cookie' in rv.headers336 match = re.search(r'\bexpires=([^;]+)(?i)', rv.headers['set-cookie'])336 match = re.search(r'(?i)\bexpires=([^;]+)', rv.headers['set-cookie'])337 expires = parse_date(match.group())338 expected = datetime.utcnow() + app.permanent_session_lifetime339 assert expires.year == expected.year340 assert expires.month == expected.month
1343 unmodified lines
modified:tests/test_ext.py+2 added-2 removed
177 unmodified lines
178179def test_no_error_swallowing(flaskext_broken):180 with pytest.raises(ImportError) as excinfo:181 import flask.ext.broken182183 assert excinfo.type is ImportError182 # python3.6 raises a subclass of ImportError: 'ModuleNotFoundError'183 assert issubclass(excinfo.type, ImportError)184 if PY2:185 message = 'No module named missing_module'186 else:187 message = 'No module named \'missing_module\''
12 unmodified lines
modified:.travis.yml+5 added-1 removed
modified:tox.ini+1 added-1 removed
1[tox]2envlist = {py26,py27,pypy}-{lowest,release,devel}{,-simplejson}, {py33,py34,py35}-{release,devel}{,-simplejson}2envlist = {py26,py27,pypy}-{lowest,release,devel}{,-simplejson}, {py33,py34,py35,py36}-{release,devel}{,-simplejson}3456[testenv]
26 unmodified lines