mirror of
https://github.com/django/daphne.git
synced 2025-07-10 16:02:18 +03:00
Add Hypothesis for property-based tests
Hypothesis: "It works by letting you write tests that assert that something should be true for every case, not just the ones you happen to think of." I think it's well suited for the task of ensuring Daphne conforms to the ASGI specification.
This commit is contained in:
parent
60952b34bf
commit
c2baa32a9c
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,3 +4,5 @@ __pycache__
|
||||||
dist/
|
dist/
|
||||||
build/
|
build/
|
||||||
/.tox
|
/.tox
|
||||||
|
.hypothesis
|
||||||
|
.cache
|
||||||
|
|
|
@ -11,6 +11,6 @@ env:
|
||||||
- TWISTED_RELEASE="twisted"
|
- TWISTED_RELEASE="twisted"
|
||||||
- TWISTED_RELEASE="twisted==16.0.0"
|
- TWISTED_RELEASE="twisted==16.0.0"
|
||||||
|
|
||||||
install: pip install $TWISTED_RELEASE -e .
|
install: pip install $TWISTED_RELEASE -e .[tests]
|
||||||
|
|
||||||
script: python -m unittest discover
|
script: python -m unittest discover
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -27,6 +27,9 @@ setup(
|
||||||
'twisted>=16.0',
|
'twisted>=16.0',
|
||||||
'autobahn>=0.12',
|
'autobahn>=0.12',
|
||||||
],
|
],
|
||||||
|
extras_require={
|
||||||
|
'tests': ['hypothesis', 'tox']
|
||||||
|
},
|
||||||
entry_points={'console_scripts': [
|
entry_points={'console_scripts': [
|
||||||
'daphne = daphne.cli:CommandLineInterface.entrypoint',
|
'daphne = daphne.cli:CommandLineInterface.entrypoint',
|
||||||
]},
|
]},
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -3,6 +3,7 @@
|
||||||
envlist = py{27,34,35}-twisted-{old,new}
|
envlist = py{27,34,35}-twisted-{old,new}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
extras = tests
|
||||||
deps =
|
deps =
|
||||||
twisted-old: twisted==16.0.0
|
twisted-old: twisted==16.0.0
|
||||||
commands = python -m unittest discover
|
commands = python -m unittest discover
|
||||||
|
|
Loading…
Reference in New Issue
Block a user