mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Add plumbing for hypothesis.
This commit is contained in:
parent
3f3f20c7b4
commit
5cec1bf1b6
4 changed files with 31 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -11,3 +11,4 @@ htmlcov/
|
|||
*.egg
|
||||
.eggs/
|
||||
*.py[co]
|
||||
./hypothesis
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@ sphinx_rtd_theme
|
|||
sphinxcontrib-spelling
|
||||
tox
|
||||
twine
|
||||
hypothesis
|
||||
hypothesis-pytest
|
||||
-e .
|
||||
-e vectors
|
||||
|
|
|
|||
4
setup.py
4
setup.py
|
|
@ -62,6 +62,10 @@ test_requirements = [
|
|||
"iso8601",
|
||||
]
|
||||
|
||||
if sys.version_info[:2] == (2, 6):
|
||||
test_requirements.append("hypothesis")
|
||||
test_requirements.append("hypothesis-pytest")
|
||||
|
||||
# If there's no vectors locally that probably means we are in a tarball and
|
||||
# need to go and get the matching vectors package from PyPi
|
||||
if not os.path.exists(os.path.join(base_dir, "vectors/setup.py")):
|
||||
|
|
|
|||
25
tox.ini
25
tox.ini
|
|
@ -8,6 +8,29 @@ deps =
|
|||
iso8601
|
||||
pretend
|
||||
pytest<2.8
|
||||
hypothesis
|
||||
hypothesis-pytest
|
||||
./vectors
|
||||
passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME
|
||||
commands =
|
||||
pip list
|
||||
python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())"
|
||||
# We use parallel mode and then combine here so that coverage.py will take
|
||||
# the paths like .tox/py34/lib/python3.4/site-packages/cryptography/__init__.py
|
||||
# and collapse them into src/cryptography/__init__.py.
|
||||
coverage run --parallel-mode -m pytest --capture=no --strict {posargs}
|
||||
coverage combine
|
||||
coverage report -m
|
||||
|
||||
[testenv:py26]
|
||||
# This mirrors the testenv minus the hypothesis and hypothesis-test deps.
|
||||
deps =
|
||||
coverage
|
||||
iso8601
|
||||
pretend
|
||||
pytest<2.8
|
||||
hypothesis
|
||||
hypothesis-pytest
|
||||
./vectors
|
||||
passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME
|
||||
commands =
|
||||
|
|
@ -85,7 +108,7 @@ commands =
|
|||
py.test --capture=no --strict --random {posargs}
|
||||
|
||||
[flake8]
|
||||
exclude = .tox,*.egg,.git,_build
|
||||
exclude = .tox,*.egg,.git,_build,.hypothesis
|
||||
select = E,W,F,N,I
|
||||
application-import-names = cryptography,cryptography_vectors,tests
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue