Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 0f166e9

Browse files
committed
Merged
2 parents 3953118 + c638b96 commit 0f166e9

File tree

9 files changed

+50
-69
lines changed

9 files changed

+50
-69
lines changed

.isort.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[settings]
2+
force_single_line = 1
3+
known_first_party = oidcmsg
4+
known_third_party = cryptojwt,pytest
5+
known_future_library = future,past
6+
default_section = THIRDPARTY

.travis.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
language: python
2-
python:
3-
- "3.5"
4-
- "3.6"
5-
# command to install dependencies
2+
3+
sudo: false
4+
5+
python: 3.6
6+
67
install:
7-
- pip install -r requirements.txt
8-
# command to run tests
8+
- pip install tox
9+
10+
env:
11+
- TOXENV=py34
12+
- TOXENV=py35
13+
- TOXENV=py36
14+
- TOXENV=py37
15+
- TOXENV=quality
16+
- TOXENV=docs
17+
18+
# Everything behaves under python 3.6 except python3.5
19+
matrix:
20+
include:
21+
- python: 3.5
22+
env: TOXENV=py35
23+
- env: TOXENV=isort-check
924
script:
10-
- pytest # or py.test for Python versions 3.5 and below
25+
- tox -e $TOXENV
26+
27+
notifications:
28+
email: false

pylama.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
max_line_length = 120
33

44
[pylama:mccabe]
5-
complexity = 40
5+
complexity = 32

requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ def run_tests(self):
3737
sys.exit(errno)
3838

3939

40-
# Python 2.7 and later ship with importlib and argparse
41-
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
42-
extra_install_requires = ["importlib", "argparse"]
43-
else:
44-
extra_install_requires = []
40+
extra_install_requires = []
4541

4642
with open('src/oidcmsg/__init__.py', 'r') as fd:
4743
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
@@ -60,7 +56,6 @@ def run_tests(self):
6056
classifiers=[
6157
"Development Status :: 4 - Beta",
6258
"License :: OSI Approved :: Apache Software License",
63-
"Programming Language :: Python :: 2.7",
6459
"Programming Language :: Python :: 3.4",
6560
"Programming Language :: Python :: 3.5",
6661
"Programming Language :: Python :: 3.6",

src/oidcmsg/oidc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class AuthorizationRequest(oauth2.AuthorizationRequest):
377377
"redirect_uri": SINGLE_REQUIRED_STRING,
378378
"nonce": SINGLE_OPTIONAL_STRING,
379379
"display": SINGLE_OPTIONAL_STRING,
380-
"prompt": OPTIONAL_LIST_OF_STRINGS,
380+
"prompt": OPTIONAL_LIST_OF_SP_SEP_STRINGS,
381381
"max_age": SINGLE_OPTIONAL_INT,
382382
"ui_locales": OPTIONAL_LIST_OF_SP_SEP_STRINGS,
383383
"claims_locales": OPTIONAL_LIST_OF_SP_SEP_STRINGS,

tests/test_2_jwt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
32
import pytest
43
from cryptojwt.jwk.rsa import RSAKey
54
from cryptojwt.jws.exception import SignerAlgError

tests/test_5_oauth2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# pylint: disable=no-self-use,missing-docstring
2-
from urllib.parse import parse_qs
3-
from urllib.parse import urlparse
42

53
import json
4+
from urllib.parse import urlparse, parse_qs
65

76
import pytest
87

tox.ini

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,30 @@
11
[tox]
2-
envlist = py{27,34,36},docs,quality
2+
envlist = py{34,35,36},docs,quality
33

44
[testenv]
5-
setenv =
6-
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
7-
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
5+
passenv = CI TRAVIS TRAVIS_*
86
commands =
9-
pipenv install --dev
10-
pipenv run py.test --cov-report= --cov=oidc tests/ -m "not network" {posargs}
11-
; Transform absolute path to relative path for compatibility with coveralls.io and fix 'source not available' error.
12-
pipenv run python -c "import os;cov_strip_abspath = open(os.environ['COVERAGE_FILE'], 'r').read().replace('.tox' + os.sep + os.path.relpath('{envsitepackagesdir}', '{toxworkdir}'), 'src');open(os.environ['COVERAGE_FILE'], 'w').write(cov_strip_abspath)"
13-
deps = pipenv
7+
py.test --cov-report= --cov=oicmsg tests/ -m "not network" {posargs}
8+
codecov
9+
extras = testing
10+
deps =
11+
codecov
12+
pytest-cov
1413

1514
[testenv:docs]
1615
whitelist_externals = make
17-
deps = pipenv
18-
commands =
19-
pipenv install --dev
20-
make html
16+
extras = docs
17+
commands = sphinx-build -b html doc/ doc/_build/html -W
2118

2219
[testenv:quality]
23-
whitelist_externals = make
24-
deps = pipenv
25-
commands =
26-
pipenv install --dev
27-
make check-isort
28-
make check-pylama
29-
30-
[testenv:coveralls]
31-
setenv =
32-
COVERAGE_FILE = {toxinidir}/.coverage
33-
passenv =
34-
*
35-
deps =
36-
coverage
37-
coveralls
38-
skip_install = true
39-
commands =
40-
coverage combine
41-
coveralls
42-
changedir = {toxinidir}
43-
44-
[testenv:coverage-erase]
45-
setenv =
46-
COVERAGE_FILE = {toxinidir}/.coverage
47-
passenv =
48-
*
49-
deps =
50-
coverage
51-
skip_install = true
20+
ignore_errors = True
21+
extras = quality
5222
commands =
53-
coverage erase
54-
changedir = {toxinidir}
23+
isort --recursive --diff --check-only src/ tests/
24+
pylama src/ tests/
5525

5626
[pep8]
5727
max-line-length=100
5828

5929
[pytest]
60-
addopts = --color=yes
30+
addopts = --color=yes

0 commit comments

Comments
 (0)