Merge pull request #3121 from Kriechi/py37-dev

test on Python 3.7-dev
This commit is contained in:
Thomas Kriechbaumer 2018-05-15 10:43:44 +02:00 committed by GitHub
commit a38497ac36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 7 deletions

View File

@ -26,6 +26,8 @@ matrix:
env: TOXENV=py36 BDIST=1 WHEEL=1 env: TOXENV=py36 BDIST=1 WHEEL=1
- python: 3.6 - python: 3.6
env: TOXENV=individual_coverage env: TOXENV=individual_coverage
- python: "3.7-dev"
env: TOXENV=py37
- language: node_js - language: node_js
node_js: "node" node_js: "node"
before_install: before_install:

View File

@ -63,17 +63,21 @@ def test_unparse():
assert url.unparse("https", "foo.com", 443, "") == "https://foo.com" assert url.unparse("https", "foo.com", 443, "") == "https://foo.com"
surrogates = bytes(range(256)).decode("utf8", "surrogateescape") # We ignore the byte 126: '~' because of an incompatibility in Python 3.6 and 3.7
# In 3.6 it is escaped as %7E
# In 3.7 it stays as ASCII character '~'
# https://bugs.python.org/issue16285
surrogates = (bytes(range(0, 126)) + bytes(range(127, 256))).decode("utf8", "surrogateescape")
surrogates_quoted = ( surrogates_quoted = (
'%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F' '%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F'
'%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F' '%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F'
'%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-./' '%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-./'
'0123456789%3A%3B%3C%3D%3E%3F' '0123456789%3A%3B%3C%3D%3E%3F%40'
'%40ABCDEFGHIJKLMNO' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'PQRSTUVWXYZ%5B%5C%5D%5E_' '%5B%5C%5D%5E_%60'
'%60abcdefghijklmno' 'abcdefghijklmnopqrstuvwxyz'
'pqrstuvwxyz%7B%7C%7D%7E%7F' '%7B%7C%7D%7F' # 7E or ~ is excluded!
'%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F' '%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F'
'%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F' '%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F'
'%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF' '%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF'

View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py36, lint envlist = py36, py37, lint
skipsdist = True skipsdist = True
toxworkdir={env:TOX_WORK_DIR:.tox} toxworkdir={env:TOX_WORK_DIR:.tox}