mirror of https://github.com/mahmoud/boltons.git
Refresh CI matrix (#320)
* add py3.10 to gha and tox * drop pypy2 from tox/gha * drop 3.6 from gha
This commit is contained in:
parent
8ba3a7fa0d
commit
d35693e875
|
@ -18,18 +18,17 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- {name: Linux, python: '3.9', os: ubuntu-latest, tox: py39}
|
||||
- {name: Windows, python: '3.9', os: windows-latest, tox: py39}
|
||||
- {name: Mac, python: '3.9', os: macos-latest, tox: py39}
|
||||
- {name: Linux, python: '3.10', os: ubuntu-latest, tox: py310}
|
||||
- {name: Windows, python: '3.10', os: windows-latest, tox: py310}
|
||||
- {name: Mac, python: '3.10', os: macos-latest, tox: py310}
|
||||
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
|
||||
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
|
||||
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
|
||||
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
|
||||
- {name: '2.7', python: '2.7', os: ubuntu-latest, tox: py27}
|
||||
- {name: 'PyPy2', python: 'pypy2', os: ubuntu-latest, tox: pypy}
|
||||
- {name: 'PyPy3', python: 'pypy3', os: ubuntu-latest, tox: pypy3}
|
||||
- {name: '2.7', python: '2.7.18', os: ubuntu-latest, tox: py27}
|
||||
- {name: 'PyPy3', python: 'pypy-3.9', os: ubuntu-latest, tox: pypy3}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: update pip
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
docs/_build
|
||||
tmp.py
|
||||
htmlcov/
|
||||
|
||||
venv/
|
||||
*.py[cod]
|
||||
|
||||
# emacs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
coverage==4.5.1
|
||||
pytest==3.0.7
|
||||
pytest-cov==2.5.1
|
||||
coverage==6.5.0
|
||||
pytest==7.2.0
|
||||
pytest-cov==4.0.0
|
||||
tox<3.0
|
||||
|
|
|
@ -29,15 +29,8 @@ _TEST_TMPLS = ["example 1: {hello}",
|
|||
"example 2: {hello:*10}",
|
||||
"example 3: {hello:*{width}}",
|
||||
"example 4: {hello!r:{fchar}{width}}, {width}, yes",
|
||||
"example 5: {0}, {1:d}, {2:f}, {1}"]
|
||||
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
pass # skip the non-2.6 compatible tests on 2.6
|
||||
else:
|
||||
_TEST_TMPLS.append("example 6: {}, {}, {}, {1}")
|
||||
del OrderedDict
|
||||
"example 5: {0}, {1:d}, {2:f}, {1}",
|
||||
"example 6: {}, {}, {}, {1}"]
|
||||
|
||||
|
||||
def test_get_fstr_args():
|
||||
|
@ -45,8 +38,7 @@ def test_get_fstr_args():
|
|||
for t in _TEST_TMPLS:
|
||||
inferred_t = infer_positional_format_args(t)
|
||||
res = get_format_args(inferred_t)
|
||||
results.append(res)
|
||||
return results
|
||||
assert res
|
||||
|
||||
|
||||
def test_split_fstr():
|
||||
|
@ -54,7 +46,7 @@ def test_split_fstr():
|
|||
for t in _TEST_TMPLS:
|
||||
res = split_format_str(t)
|
||||
results.append(res)
|
||||
return results
|
||||
assert res
|
||||
|
||||
|
||||
def test_tokenize_format_str():
|
||||
|
@ -62,7 +54,7 @@ def test_tokenize_format_str():
|
|||
for t in _TEST_TMPLS:
|
||||
res = tokenize_format_str(t)
|
||||
results.append(res)
|
||||
return results
|
||||
assert res
|
||||
|
||||
|
||||
def test_deferredvalue():
|
||||
|
|
|
@ -99,7 +99,7 @@ def test_idna():
|
|||
def test_query_params(test_url):
|
||||
url_obj = URL(test_url)
|
||||
if not url_obj.query_params or url_obj.fragment:
|
||||
return True
|
||||
return
|
||||
qp_text = url_obj.query_params.to_text(full_quote=True)
|
||||
assert test_url.endswith(qp_text)
|
||||
|
||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,6 +1,13 @@
|
|||
[tox]
|
||||
envlist = py27,py34,py37,py39,pypy
|
||||
envlist = py27,py37,py39,py310,pypy3
|
||||
[testenv]
|
||||
changedir = .tox
|
||||
deps = -rrequirements-test.txt
|
||||
commands = py.test --doctest-modules {envsitepackagesdir}/boltons {toxinidir}/tests {posargs}
|
||||
|
||||
[testenv:py27]
|
||||
deps =
|
||||
coverage==5.5
|
||||
pytest==4.6.11
|
||||
pytest-cov==2.12
|
||||
|
||||
|
|
Loading…
Reference in New Issue