Skip to content

Commit 46f6797

Browse files
committed
add testing of upstream requirements
1 parent 4b3a03b commit 46f6797

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,48 @@ sudo: false
22
language: python
33
matrix:
44
include:
5+
# CPython 2.7
56
- python: 2.7
67
env: TOXENV=py27-local-slow
78
- python: 2.7
89
env: TOXENV=py27-integ-slow
10+
# CPython 3.4
911
- python: 3.4
1012
env: TOXENV=py34-local-slow
1113
- python: 3.4
1214
env: TOXENV=py34-integ-slow
15+
# CPython 3.5
1316
- python: 3.5
1417
env: TOXENV=py35-local-slow
1518
- python: 3.5
1619
env: TOXENV=py35-integ-slow
20+
# CPython 3.6
1721
- python: 3.6
1822
env: TOXENV=py36-local-slow
1923
- python: 3.6
2024
env: TOXENV=py36-integ-slow
21-
# Disabled pending completion of integration
22-
# https://github.com/aws/aws-dynamodb-encryption-python/issues/66
25+
# Upstream tests
26+
- python: 2.7
27+
env: TOXENV=test-upstream-requirements-py27
28+
# MyPy
29+
# Disabled pending completion of integration
30+
# https://github.com/aws/aws-dynamodb-encryption-python/issues/66
2331
# - python: 3.6
2432
# env: TOXENV=mypy-py2
2533
# - python: 3.6
2634
# env: TOXENV=mypy-py3
35+
# Security
2736
- python: 3.6
2837
env: TOXENV=bandit
38+
# Linting
2939
- python: 3.6
3040
env: TOXENV=doc8
3141
- python: 3.6
3242
env: TOXENV=readme
3343
- python: 3.6
3444
env: TOXENV=docs
35-
# Disabled pending completion of cleanup
36-
# https://github.com/aws/aws-dynamodb-encryption-python/issues/67
45+
# Disabled pending completion of cleanup
46+
# https://github.com/aws/aws-dynamodb-encryption-python/issues/67
3747
# - python: 3.6
3848
# env: TOXENV=flake8
3949
# - python: 3.6

tox.ini

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ envlist =
55
flake8, pylint,
66
flake8-tests, pylint-tests,
77
flake8-examples, pylint-examples,
8-
vulture
8+
vulture,
9+
test-upstream-requirements-py{2,3}7
910

1011
# Additional environments:
1112
# vulture :: Runs vulture. Prone to false-positives.
@@ -21,7 +22,7 @@ envlist =
2122
# release :: Builds dist files and uploads to pypi pypirc profile.
2223

2324
[testenv:base-command]
24-
commands = pytest --basetemp={envtmpdir} -l --cov dynamodb_encryption_sdk {posargs}
25+
commands = pytest --basetemp={envtmpdir} -l --cov dynamodb_encryption_sdk test/ {posargs}
2526

2627
[testenv]
2728
passenv =
@@ -76,8 +77,7 @@ sitepackages = False
7677
skip_install = True
7778
recreate = True
7879
deps =
79-
commands =
80-
{toxinidir}/test/freeze-upstream-requirements.sh
80+
commands = {toxinidir}/test/freeze-upstream-requirements.sh
8181

8282
# Freeze for Python 2.7
8383
[testenv:freeze-upstream-requirements-py27]
@@ -97,6 +97,28 @@ recreate = {[testenv:freeze-upstream-requirements-base]recreate}
9797
deps = {[testenv:freeze-upstream-requirements-base]deps}
9898
commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py37.txt
9999

100+
# Test frozen upstream requirements
101+
[testenv:test-upstream-requirements-base]
102+
sitepackages = False
103+
recreate = True
104+
commands = {[testenv:base-command]commands} -m "local and not slow and not veryslow and not nope"
105+
106+
# Test frozen upstream requirements for Python 2.7
107+
[testenv:test-upstream-requirements-py27]
108+
basepython = python2.7
109+
deps = -rtest/upstream-requirements-py27.txt
110+
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
111+
recreate = {[testenv:test-upstream-requirements-base]recreate}
112+
commands = {[testenv:test-upstream-requirements-base]commands}
113+
114+
# Test frozen upstream requirements for Python 3.7
115+
[testenv:test-upstream-requirements-py37]
116+
basepython = python3.7
117+
deps = -rtest/upstream-requirements-py37.txt
118+
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
119+
recreate = {[testenv:test-upstream-requirements-base]recreate}
120+
commands = {[testenv:test-upstream-requirements-base]commands}
121+
100122
# Verify that tests can be successfully run from the source build.
101123
[testenv:sourcebuildcheck]
102124
basepython = python3

0 commit comments

Comments
 (0)