Last active
December 2, 2016 00:39
-
-
Save christian-blades-cb/636c08b32447b22a9b5974fe9165e18a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:2.7-alpine | |
RUN pip install tox | |
ADD . /src | |
WORKDIR /src | |
CMD tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hypothesis import given | |
import hypothesis.strategies as st | |
ASCII_NO_WHITESPACE_TABS_NEWLINES = st.characters(min_codepoint=1, max_codepoint=128, blacklist_categories=('Cc', 'Zs', 'Po')) | |
BUCKET_NAMES = st.text(min_size=1, max_size=1024, alphabet=ASCII_NO_WHITESPACE_TABS_NEWLINES) | |
@given(BUCKET_NAMES, st.integers()) | |
def test_incr(bucket, delta): | |
with assert_statsd_received(BINDING, bucket, str(delta), "c", None): | |
client = statsd.StatsDEmitter(*BINDING) | |
client.incr(bucket, delta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tox] | |
envlist = py27 | |
downloadcache = {toxworkdir}/_download/ | |
[testenv] | |
deps = | |
pytest | |
mock | |
pytest-cov | |
hypothesis | |
sitepackages = False | |
commands = | |
py.test -v --cov=statsd --cov-report=term-missing test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment