[Python-modules-commits] [python-hypothesis] 04/12: Import python-hypothesis_1.18.0.orig.tar.gz
Tristan Seligmann
mithrandi at moszumanska.debian.org
Sat Jan 23 02:52:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
mithrandi pushed a commit to branch master
in repository python-hypothesis.
commit 9cb4900fe95190c3a6cb4a87a6ee68cb8d53fa65
Author: Tristan Seligmann <mithrandi at debian.org>
Date: Mon Dec 21 13:46:10 2015 +0200
Import python-hypothesis_1.18.0.orig.tar.gz
---
.coveragerc | 23 +
.gitignore | 12 +
.travis.yml | 81 +
CONTRIBUTING.rst | 156 +
LICENSE.txt | 4 +
Makefile | 181 +
PKG-INFO | 71 -
README.rst | 3 +
appveyor.yml | 64 +
docs/_static/.empty | 0
docs/changes.rst | 1264 +++++
docs/community.rst | 56 +
docs/conf.py | 97 +
docs/data.rst | 491 ++
docs/database.rst | 71 +
docs/details.rst | 529 +++
docs/development.rst | 30 +
docs/django.rst | 245 +
docs/endorsements.rst | 117 +
docs/examples.rst | 485 ++
docs/extras.rst | 197 +
docs/healthchecks.rst | 24 +
docs/index.rst | 76 +
docs/internals.rst | 287 ++
docs/manifesto.rst | 60 +
docs/packaging.rst | 103 +
docs/quickstart.rst | 319 ++
docs/settings.rst | 231 +
docs/stateful.rst | 407 ++
docs/support.rst | 16 +
docs/supported.rst | 91 +
docs/usage.rst | 36 +
src/hypothesis/version.py => examples/__init__.py | 5 -
examples/bintree.py | 619 +++
notebooks/Designing a better simplifier.ipynb | 4911 ++++++++++++++++++++
scripts/basic-test.sh | 74 +
.../version.py => scripts/check_encoding_header.py | 20 +-
scripts/enforce_header.py | 65 +
src/hypothesis/version.py => scripts/header.py | 3 -
scripts/install.ps1 | 180 +
scripts/install.sh | 105 +
scripts/pyenv-installer | 88 +
scripts/run_with_env.cmd | 47 +
setup.cfg | 5 -
setup.py | 14 -
src/hypothesis.egg-info/PKG-INFO | 71 -
src/hypothesis.egg-info/SOURCES.txt | 74 -
src/hypothesis.egg-info/dependency_links.txt | 1 -
src/hypothesis.egg-info/entry_points.txt | 3 -
src/hypothesis.egg-info/not-zip-safe | 1 -
src/hypothesis.egg-info/requires.txt | 30 -
src/hypothesis.egg-info/top_level.txt | 1 -
src/hypothesis/control.py | 2 +
src/hypothesis/core.py | 47 +-
src/hypothesis/internal/charstree.py | 20 +-
src/hypothesis/searchstrategy/morphers.py | 247 +-
src/hypothesis/searchstrategy/numbers.py | 77 +-
src/hypothesis/strategies.py | 90 +-
src/hypothesis/version.py | 2 +-
src/hypothesis/version.py => tests/__init__.py | 5 -
tests/common/__init__.py | 121 +
tests/common/basic.py | 48 +
tests/common/utils.py | 63 +
src/hypothesis/version.py => tests/conftest.py | 29 +-
.../version.py => tests/cover/__init__.py | 5 -
tests/cover/test_bad_repr.py | 82 +
tests/cover/test_basic_strategy.py | 217 +
tests/cover/test_charstree.py | 90 +
tests/cover/test_choices.py | 73 +
.../version.py => tests/cover/test_chooser.py | 31 +-
tests/cover/test_classmap.py | 90 +
tests/cover/test_collective_minimization.py | 56 +
tests/cover/test_composite.py | 96 +
tests/cover/test_control.py | 115 +
.../version.py => tests/cover/test_conventions.py | 7 +-
tests/cover/test_converter.py | 59 +
tests/cover/test_core.py | 94 +
tests/cover/test_custom_reprs.py | 58 +
tests/cover/test_database.py | 257 +
tests/cover/test_database_backend.py | 85 +
tests/cover/test_deferred_errors.py | 73 +
tests/cover/test_deprecated_api.py | 299 ++
tests/cover/test_deprecation.py | 101 +
.../version.py => tests/cover/test_descriptors.py | 14 +-
tests/cover/test_direct_strategies.py | 255 +
.../cover/test_distributions.py | 30 +-
.../version.py => tests/cover/test_draw_example.py | 19 +-
.../cover/test_dynamic_variable.py | 21 +-
.../cover/test_eval_as_source.py | 26 +-
.../version.py => tests/cover/test_example.py | 12 +-
tests/cover/test_examplesource.py | 91 +
tests/cover/test_executors.py | 89 +
tests/cover/test_exhaustion.py | 56 +
tests/cover/test_explicit_examples.py | 208 +
tests/cover/test_extmethod.py | 69 +
tests/cover/test_fancy_repr.py | 52 +
tests/cover/test_filestorage.py | 56 +
.../version.py => tests/cover/test_filtering.py | 18 +-
tests/cover/test_find.py | 107 +
tests/cover/test_flatmap.py | 148 +
tests/cover/test_float_nastiness.py | 130 +
tests/cover/test_forking.py | 126 +
tests/cover/test_given_error_conditions.py | 60 +
tests/cover/test_health_checks.py | 193 +
.../version.py => tests/cover/test_idkey.py | 26 +-
.../version.py => tests/cover/test_imports.py | 10 +-
tests/cover/test_manual_given_invocation.py | 80 +
.../version.py => tests/cover/test_minimal.py | 23 +-
tests/cover/test_morpher.py | 116 +
tests/cover/test_nary_tree.py | 77 +
tests/cover/test_nice_string.py | 200 +
.../version.py => tests/cover/test_numerics.py | 17 +-
.../version.py => tests/cover/test_one_of.py | 24 +-
.../version.py => tests/cover/test_permutations.py | 23 +-
tests/cover/test_random_module.py | 45 +
tests/cover/test_randomization.py | 51 +
tests/cover/test_recursive.py | 179 +
tests/cover/test_reflection.py | 628 +++
tests/cover/test_reporting.py | 94 +
.../version.py => tests/cover/test_sampled_from.py | 9 +-
tests/cover/test_searchstrategy.py | 192 +
tests/cover/test_sets.py | 107 +
tests/cover/test_settings.py | 166 +
tests/cover/test_setup_teardown.py | 150 +
tests/cover/test_sharing.py | 75 +
tests/cover/test_simple_characters.py | 94 +
tests/cover/test_simple_collections.py | 273 ++
tests/cover/test_simple_numbers.py | 299 ++
tests/cover/test_simple_strings.py | 120 +
tests/cover/test_sizes.py | 54 +
tests/cover/test_stateful.py | 600 +++
.../cover/test_strategytests.py | 11 +-
tests/cover/test_streams.py | 182 +
tests/cover/test_testdecorators.py | 642 +++
.../version.py => tests/cover/test_timeout.py | 27 +-
tests/cover/test_tracker.py | 99 +
.../version.py => tests/cover/test_uuids.py | 15 +-
tests/cover/test_validation.py | 151 +
tests/cover/test_verbosity.py | 126 +
tests/cover/test_via_the_database.py | 116 +
.../cover/test_weird_settings.py | 11 +-
.../version.py => tests/datetime/__init__.py | 5 -
tests/datetime/test_dates.py | 69 +
tests/datetime/test_datetime.py | 209 +
tests/datetime/test_times.py | 98 +
.../version.py => tests/django/__init__.py | 5 -
.../version.py => tests/django/manage.py | 12 +-
.../version.py => tests/django/toys/__init__.py | 5 -
tests/django/toys/settings.py | 104 +
.../version.py => tests/django/toys/urls.py | 12 +-
.../version.py => tests/django/toys/wsgi.py | 19 +-
.../django/toystore/__init__.py | 5 -
.../version.py => tests/django/toystore/admin.py | 3 -
tests/django/toystore/models.py | 81 +
tests/django/toystore/test_basic_configuration.py | 71 +
tests/django/toystore/test_fixtures.py | 88 +
tests/django/toystore/test_given_models.py | 83 +
.../version.py => tests/django/toystore/views.py | 3 -
.../version.py => tests/fakefactory/__init__.py | 5 -
tests/fakefactory/test_fake_factory.py | 112 +
.../version.py => tests/nocover/__init__.py | 5 -
tests/nocover/test_compat.py | 81 +
.../version.py => tests/nocover/test_debug.py | 22 +-
tests/nocover/test_descriptortests.py | 257 +
tests/nocover/test_example_quality.py | 508 ++
tests/nocover/test_floating.py | 163 +
tests/nocover/test_git_merge.py | 139 +
tests/nocover/test_pretty_repr.py | 119 +
tests/nocover/test_statistical_distribution.py | 407 ++
tests/nocover/test_strategy_state.py | 367 ++
.../version.py => tests/nocover/test_streams.py | 19 +-
.../version.py => tests/numpy/__init__.py | 5 -
tests/numpy/test_gen_data.py | 102 +
src/hypothesis/version.py => tests/py2/__init__.py | 5 -
.../version.py => tests/py2/test_destructuring.py | 21 +-
src/hypothesis/version.py => tests/py3/__init__.py | 5 -
.../py3/test_unicode_identifiers.py | 25 +-
tests/pytest/test_capture.py | 83 +
.../version.py => tests/pytest/test_compat.py | 12 +-
.../version.py => tests/pytest/test_mark.py | 24 +-
.../version.py => tests/pytest/test_profiles.py | 27 +-
.../version.py => tests/pytest/test_reporting.py | 27 +-
.../version.py => tests/pytest/test_runs.py | 19 +-
tox.ini | 132 +
184 files changed, 24642 insertions(+), 596 deletions(-)
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..1d09c62
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,23 @@
+[run]
+branch = True
+include =
+ .tox/*/lib/*/site-packages/hypothesis/*.py
+ .tox/*/lib/*/site-packages/hypothesis/**/*.py
+omit =
+ **/settings.py
+ **/pytestplugin.py
+ **/strategytests.py
+ **/internal/debug.py
+ **/compat*.py
+ **/extra/__init__.py
+
+[report]
+exclude_lines =
+ @abc.abstractmethod
+ @abc.abstractproperty
+ NotImplementedError
+ pragma: no cover
+ __repr__
+ __ne__
+ __copy__
+ __deepcopy__
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cf521b1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+*.swo
+*.swp
+*.pyc
+venv*
+.cache
+.hypothesis
+docs/_build
+*.egg-info
+_build
+.tox
+.coverage
+.runtimes
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..c8321cf
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,81 @@
+language: c
+
+sudo: false
+
+env: PYTHONDONTWRITEBYTECODE=x
+
+os:
+ - osx
+ - linux
+
+cache:
+ apt: true
+ directories:
+ - $HOME/.runtimes
+ - $HOME/.venv
+ - $HOME/.cache/pip
+ - $HOME/wheelhouse
+
+env:
+ global:
+ - BUILD_RUNTIMES=$HOME/.runtimes
+
+ matrix:
+ - TASK=documentation
+ - TASK=lint
+ - TASK=check-format
+ - TASK=check-coverage
+ - TASK=check-pypy
+ - TASK=check-py26
+ - TASK=check-py35
+ - TASK=check-py27
+ - TASK=check-py33
+ - TASK=check-py34
+ - TASK=check-nose
+ - TASK=check-pytest27
+ - TASK=check-pytest26
+ - TASK=check-fakefactory052
+ - TASK=check-fakefactory053
+ - TASK=check-pytest26
+ - TASK=check-django17
+ - TASK=check-django18
+ - TASK=check-examples2
+ - TASK=check-examples3
+
+script:
+ - make $TASK
+
+matrix:
+ exclude:
+ - os: osx
+ env: TASK=check-fakefactory052
+ - os: osx
+ env: TASK=check-fakefactory053
+ - os: osx
+ env: TASK=check-pytest26
+ - os: osx
+ env: TASK=check-pytest27
+ - os: osx
+ env: TASK=documentation
+ - os: osx
+ env: TASK=check-django17
+ - os: osx
+ env: TASK=check-django18
+ - os: osx
+ env: TASK=check-examples2
+ - os: osx
+ env: TASK=check-examples3
+ - os: osx
+ env: TASK=check-coverage
+ - os: osx
+ env: TASK=check-format
+ - os: osx
+ env: TASK=lint
+ fast_finish: true
+
+notifications:
+ email:
+ recipients:
+ - david at drmaciver.com
+ on_success: never
+ on_failure: change
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..03bda7c
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,156 @@
+=============
+Contributing
+=============
+
+First off: It's great that you want to contribute to Hypothesis! Thanks!
+
+The process is a little involved (don't worry, I'll help you through it), so
+do read this document first.
+
+-----------------------
+Copyright and Licensing
+-----------------------
+
+It's important to make sure that you own the rights to the work you are submitting.
+If it is done on work time, or you have a particularly onerous contract, make sure
+you've checked with your employer.
+
+All work in Hypothesis is licensed under the terms of the
+`Mozilla Public License, version 2.0 <http://mozilla.org/MPL/2.0/>`_. By
+submitting a contribution you are agreeing to licence your work under those
+terms.
+
+Finally, if it is not there already, add your name (and a link to your GitHub
+and email address if you want) to the list of contributors found at
+the end of this document, in alphabetical order. It doesn't have to be your
+"real" name (whatever that means), any sort of public identifier
+is fine. In particular a GitHub account is sufficient.
+
+-----------------------
+The actual contribution
+-----------------------
+
+OK, so you want to make a contribution and have sorted out the legalese. What now?
+
+First off: If you're planning on implementing a new feature, talk to me first! I'll probably
+tell you to go for it, but I might have some feedback on aspects of it or tell you how it fits
+into the broader scheme of things. Remember: A feature is for 1.x, not just for Christmas. Once
+a feature is in, it can only be evolved in backwards compatible ways until I bump the "I can break
+your code" number and release Hypothesis 2.0. This means I spend a lot of time thinking about
+getting features right. It may sometimes also mean I reject your feature, or feel you need to
+rethink it, so it's best to have that conversation early.
+
+Once you've done that, feel free to ask me for help as you go. You're welcome to submit a work in
+progress pull request early if you want feedback, just please mark it as such.
+
+The review process will probably take some time, with me providing feedback on what I like about
+your work and what I think could use improving. Particularly when adding features it's very unlikely
+I'll accept a pull request as is, but that's not a sign that I don't like your code and you shouldn't
+get discouraged.
+
+Before it's merged your contribution will have to be:
+
+1. Tested (the build will probably fail if it's not, but even if the build passes new work needs test)
+2. Documented
+3. Complying to the code standard (running 'make format' locally will fix most formatting errors and 'make lint'
+ will tell you about the rest)
+4. Otherwise passing the build
+
+Note: If you can't figure out how to test your work, I'm happy to help. If *I* can't figure out how to
+test your work, I may pass it anyway.
+
+~~~~~~~~~
+The build
+~~~~~~~~~
+
+The build is orchestrated by a giant Makefile which handles installation of the relevant pythons.
+Actually running the tests is managed by `tox <https://tox.readthedocs.org/en/latest/>`_, but the Makefile
+will call out to the relevant tox environments so you mostly don't have to know anything about that
+unless you want to make changes to the test config. You also mostly don't need to know anything about make
+except to type 'make' followed by the name of the task you want to run.
+
+All of it will be checked on Travis so you don't *have* to run anything locally, but you might
+find it useful to do so: A full travis run takes about an hour, so running a smaller set of
+tests locally can be helpful.
+
+The makefile should be "fairly" portable, but is currently only known to work on Linux or OS X. It *might* work
+on a BSD or on Windows with cygwin installed, but it probably won't.
+
+Some notable commands:
+
+'make format' will reformat your code according to the Hypothesis coding style. You should use this before each
+commit ideally, but you only really have to use it when you want your code to be ready to merge.
+
+You can also use 'make check-format', which will run format and some linting and will then error if you have a
+git diff. Note: This will error even if you started with a git diff, so if you've got any uncommitted changes
+this will necessarily report an error.
+
+'make check' will run check-format and all of the tests. Warning: This will take a *very* long time. On travis the
+currently takes multiple hours of total build time (it runs in parallel on Travis so you don't have to wait
+quite that long). If you've got a multi-core machine you can run 'make -j 2' (or any higher number if you want
+more) to run 2 jobs in parallel, but to be honest you're probably better off letting travis run this step.
+
+You can also run a number of finer grained make tasks:
+
+* check-fast runs a fast but reasonably comprehensive subset of make check. It's still not *that* fast, but it
+ takes a couple of minutes instead of a couple of hours.
+* You can run the tests just for a single version of Python using one of check-py26, check-py27, check-py34,
+ check-py35, check-pypy.
+* check-coverage will run a subset of the tests on python 3.5 and then assert that this gave 100% coverage
+* lint will just run some source code checks.
+* django will just run tests for the django integration
+* pytest will just run tests for the pytest plugin
+
+Note: The build requires a lot of different versions of python, so rather than have you install them yourself,
+the makefile will install them itself in a local directory. This means that the first time you run a task you
+may have to wait a while as the build downloads and installs the right version of python for you.
+
+----------------------------
+If Pull Requests put you off
+----------------------------
+
+If you don't feel able to contribute code to Hypothesis that's *100% OK*. There
+are lots of other things you can do to help too!
+
+For example, it's super useful and highly appreciated if you do any of:
+
+* Submit bug reports
+* Submit feature requests
+* Write about Hypothesis
+* Build libraries and tools on top of Hypothesis outside the main repo
+
+Of, if you're OK with the pull request but don't feel quite ready to touch the code, you can always
+help to improve the documentation. Spot a tyop? Fix it up and send me a pull request!
+
+If you need any help with any of these, get in touch and I'll be extremely happy to provide it.
+
+--------------------
+List of Contributors
+--------------------
+
+The primary author for most of Hypothesis is David R. MacIver (me). However the following
+people have also contributed work. As well as my thanks, they also have copyright over
+their individual contributions.
+
+* `Adam Johnson <https://github.com/adamchainz>`_
+* `Adam Sven Johnson <https://www.github.com/pkqk>`_
+* `Alex Stapleton <https://www.github.com/public>`_
+* `Alex Willmer <https://github.com/moreati>`_ (`alex at moreati.org.uk <mailto:alex at moreati.org.uk>`_)
+* `Charles O'Farrell <https://www.github.com/charleso>`_
+* `Chris Down <https://chrisdown.name>`_
+* `Christopher Martin <https://www.github.com/chris-martin>`_ (`ch.martin at gmail.com <mailto:ch.martin at gmail.com>`_)
+* `Cory Benfield <https://www.github.com/Lukasa>`_
+* `Derek Gustafson <https://www.github.com/degustaf>`_
+* `Florian Bruhin <https://www.github.com/The-Compiler>`_
+* `follower <https://www.github.com/follower>`_
+* `Jonty Wareing <https://www.github.com/Jonty>`_ (`jonty at jonty.co.uk <mailto:jonty at jonty.co.uk>`_)
+* `kbara <https://www.github.com/kbara>`_
+* `marekventur <https://www.github.com/marekventur>`_
+* `Marius Gedminas <https://www.github.com/mgedmin>`_ (`marius at gedmin.as <mailto:marius at gedmin.as>`_)
+* `Matt Bachmann <https://www.github.com/bachmann1234>`_ (`bachmann.matt at gmail.com <mailto:bachmann.matt at gmail.com>`_)
+* `Nicholas Chammas <https://www.github.com/nchammas>`_
+* `Richard Boulton <https://www.github.com/rboulton>`_ (`richard at tartarus.org <mailto:richard at tartarus.org>`_)
+* `Saul Shanabrook <https://www.github.com/saulshanabrook>`_ (`s.shanabrook at gmail.com <mailto:s.shanabrook at gmail.com>`_)
+* `Tariq Khokhar <https://www.github.com/tkb>`_ (`tariq at khokhar.net <mailto:tariq at khokhar.net>`_)
+* `Will Hall <https://www.github.com/wrhall>`_ (`wrsh07 at gmail.com <mailto:wrsh07 at gmail.com>`_)
+* `Will Thompson <https://www.github.com/wjt>`_ (`will at willthompson.co.uk <mailto:will at willthompson.co.uk>`_)
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..496323d
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,4 @@
+Copyright (c) 2013, David R. MacIver
+
+All code in this repository except where explicitly noted otherwise is released
+under the Mozilla Public License v 2.0. You can obtain a copy at http://mozilla.org/MPL/2.0/.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7ace141
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,181 @@
+.PHONY: clean documentation
+
+
+DEVELOPMENT_DATABASE?=postgres://whereshouldilive@localhost/whereshouldilive_dev
+SPHINXBUILD = $(DEV_PYTHON) -m sphinx
+SPHINX_BUILDDIR = docs/_build
+ALLSPHINXOPTS = -d $(SPHINX_BUILDDIR)/doctrees docs -W
+
+BUILD_RUNTIMES?=$(PWD)/.runtimes
+
+PY26=$(BUILD_RUNTIMES)/snakepit/python2.6
+PY27=$(BUILD_RUNTIMES)/snakepit/python2.7
+PY33=$(BUILD_RUNTIMES)/snakepit/python3.3
+PY34=$(BUILD_RUNTIMES)/snakepit/python3.4
+PY35=$(BUILD_RUNTIMES)/snakepit/python3.5
+PYPY=$(BUILD_RUNTIMES)/snakepit/pypy
+
+TOOLS=$(BUILD_RUNTIMES)/tools
+
+TOX=$(TOOLS)/tox
+SPHINX_BUILD=$(TOOLS)/sphinx-build
+SPHINX_AUTOBUILD=$(TOOLS)/sphinx-autobuild
+ISORT=$(TOOLS)/isort
+FLAKE8=$(TOOLS)/flake8
+PYFORMAT=$(TOOLS)/pyformat
+
+TOOL_VIRTUALENV=$(BUILD_RUNTIMES)/virtualenvs/tools
+ISORT_VIRTUALENV=$(BUILD_RUNTIMES)/virtualenvs/isort
+TOOL_PYTHON=$(TOOL_VIRTUALENV)/bin/python
+TOOL_PIP=$(TOOL_VIRTUALENV)/bin/pip
+TOOL_INSTALL=$(TOOL_PIP) install --upgrade
+
+export PATH:=$(BUILD_RUNTIMES)/snakepit:$(TOOLS):$(PATH)
+export LC_ALL=C.UTF-8
+
+$(PY26):
+ scripts/install.sh 2.6
+
+$(PY27):
+ scripts/install.sh 2.7
+
+$(PY33):
+ scripts/install.sh 3.3
+
+$(PY34):
+ scripts/install.sh 3.4
+
+$(PY35):
+ scripts/install.sh 3.5
+
+$(PYPY):
+ scripts/install.sh pypy
+
+$(TOOL_VIRTUALENV): $(PY34)
+ $(PY34) -m virtualenv $(TOOL_VIRTUALENV)
+ mkdir -p $(TOOLS)
+
+$(TOOLS): $(TOOL_VIRTUALENV)
+
+$(ISORT_VIRTUALENV): $(PY34)
+ $(PY34) -m virtualenv $(ISORT_VIRTUALENV)
+
+format: $(PYFORMAT) $(ISORT)
+ $(TOOL_PYTHON) scripts/enforce_header.py
+ # isort will sort packages differently depending on whether they're installed
+ $(ISORT_VIRTUALENV)/bin/python -m pip install django pytz pytest fake-factory numpy
+ env -i PATH=$(PATH) $(ISORT) -p hypothesis -ls -m 2 -w 75 \
+ -a "from __future__ import absolute_import, print_function, division" \
+ -rc src tests examples
+ find src tests examples -name '*.py' | xargs $(PYFORMAT) -i
+
+lint: $(FLAKE8)
+ $(FLAKE8) src tests --exclude=compat.py,test_reflection.py,test_imports.py,tests/py2 --ignore=E731,E721
+
+check-format: format
+ find src tests -name "*.py" | xargs $(TOOL_PYTHON) scripts/check_encoding_header.py
+ git diff --exit-code
+
+check-py26: $(PY26) $(TOX)
+ $(TOX) -e py26-full
+
+check-py27: $(PY27) $(TOX)
+ $(TOX) -e py27-full
+
+check-py33: $(PY33) $(TOX)
+ $(TOX) -e py33-full
+
+check-py34: $(py34) $(TOX)
+ $(TOX) -e py34-full
+
+check-py35: $(PY35) $(TOX)
+ $(TOX) -e py35-full
+
+check-pypy: $(PYPY) $(TOX)
+ $(TOX) -e pypy-full
+
+check-nose: $(TOX) $(PY35)
+ $(TOX) -e nose
+
+check-pytest27: $(TOX) $(PY35)
+ $(TOX) -e pytest27
+
+check-pytest26: $(TOX) $(PY35)
+ $(TOX) -e pytest26
+
+check-pytest: check-pytest26 check-pytest27
+
+check-fakefactory052: $(TOX) $(PY35)
+ $(TOX) -e fakefactory052
+
+check-fakefactory053: $(TOX) $(PY35)
+ $(TOX) -e fakefactory053
+
+check-django17: $(TOX) $(PY35)
+ $(TOX) -e django17
+
+check-django18: $(TOX) $(PY35)
+ $(TOX) -e django18
+
+check-django19: $(TOX) $(PY35)
+ $(TOX) -e django19
+
+check-django: check-django17 check-django18 check-django19
+
+check-examples2: $(TOX) $(PY27)
+ $(TOX) -e examples2
+
+check-examples3: $(TOX) $(PY35)
+ $(TOX) -e examples3
+
+check-coverage: $(TOX) $(PY35)
+ $(TOX) -e coverage
+
+check-noformat: check-coverage check-py26 check-py27 check-py33 check-py34 check-py35 check-pypy check-django check-pytest
+
+check: check-format check-noformat
+
+check-fast: lint $(PY26) $(PY35) $(PYPY) $(TOX)
+ $(TOX) -e pypy-brief
+ $(TOX) -e py35-brief
+ $(TOX) -e py26-brief
+ $(TOX) -e py35-prettyquick
+
+$(TOX): $(PY35) tox.ini $(TOOLS)
+ $(TOOL_INSTALL) tox
+ rm -f $(TOX)
+ rm -rf .tox
+ ln -sf $(TOOL_VIRTUALENV)/bin/tox $(TOX)
+
+$(SPHINX_BUILD): $(TOOL_VIRTUALENV)
+ $(TOOL_PYTHON) -m pip install sphinx
+ ln -sf $(TOOL_VIRTUALENV)/bin/sphinx-build $(SPHINX_BUILD)
+
+$(SPHINX_AUTOBUILD): $(TOOL_VIRTUALENV)
+ $(TOOL_PYTHON) -m pip install sphinx-autobuild
+ ln -sf $(TOOL_VIRTUALENV)/bin/sphinx-autobuild $(SPHINX_AUTOBUILD)
+
+$(PYFORMAT): $(TOOL_VIRTUALENV)
+ $(TOOL_INSTALL) pyformat
+ ln -sf $(TOOL_VIRTUALENV)/bin/pyformat $(PYFORMAT)
+
+$(ISORT): $(ISORT_VIRTUALENV)
+ $(ISORT_VIRTUALENV)/bin/python -m pip install isort==4.1.0
+ ln -sf $(ISORT_VIRTUALENV)/bin/isort $(ISORT)
+
+$(FLAKE8): $(TOOL_VIRTUALENV)
+ $(TOOL_INSTALL) flake8
+ ln -sf $(TOOL_VIRTUALENV)/bin/flake8 $(FLAKE8)
+
+clean:
+ rm -rf .tox
+ rm -rf .hypothesis
+ rm -rf docs/_build
+ rm -rf $(TOOLS)
+ rm -rf $(BUILD_RUNTIMES)/snakepit
+ rm -rf $(BUILD_RUNTIMES)/virtualenvs
+ find src tests -name "*.pyc" -delete
+ find src tests -name "__pycache__" -delete
+
+documentation: $(SPHINX_BUILD) docs/*.rst
+ $(SPHINX_BUILD) -W -b html -d docs/_build/doctrees docs docs/_build/html
diff --git a/PKG-INFO b/PKG-INFO
deleted file mode 100644
index c89d9a7..0000000
--- a/PKG-INFO
+++ /dev/null
@@ -1,71 +0,0 @@
-Metadata-Version: 1.1
-Name: hypothesis
-Version: 1.17.0
-Summary: A library for property based testing
-Home-page: https://github.com/DRMacIver/hypothesis
-Author: David R. MacIver
-Author-email: david at drmaciver.com
-License: MPL v2
-Description: ==========
- Hypothesis
- ==========
-
- Hypothesis is a library for testing your Python code against a much larger range
- of examples than you would ever want to write by hand. It's based on the Haskell
- library, Quickcheck, and is designed to integrate seamlessly into your existing
- Python unit testing work flow.
-
- Hypothesis is both extremely practical and also advances the state of the art of
- unit testing by some way. It's easy to use, stable, and extremely powerful. If
- you're not using Hypothesis to test your project then you're missing out.
-
- Hypothesis works with most widely used versions of Python. It supports implementations
- compatible with 2.6, 2.7 and 3.3+, and is known to work on CPython and PyPy (but not
- PyPy3 until they support a 3.3 compatible version of the language). It does *not* currently
- work on Jython or on Python 3.0 through 3.2.
-
- -----------------
- Links of interest
- -----------------
-
- To learn more about how to use Hypothesis, extensive documentation and
- examples of usage are `available at readthedocs <https://hypothesis.readthedocs.org/en/master/>`_.
-
- If you want to talk to people about using Hypothesis, `we have both an IRC channel
- and a mailing list <https://hypothesis.readthedocs.org/en/latest/community.html>`_.
-
- If you want to contribute to Hypothesis, `instructions are here <https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst>`_.
-
- If you're looking for inspiration for writing your own QuickCheck clone,
- `here's a list of ideas you might want to borrow <https://hypothesis.readthedocs.org/en/latest/internals.html>`_.
-
- If you want to hear from people who are already using Hypothesis, some of them `have written
- about it <https://hypothesis.readthedocs.org/en/latest/endorsements.html>`_.
-
- If you want to create a downstream package of Hypothesis, please read `these guidelines for packagers <http://hypothesis.readthedocs.org/en/latest/packaging.html>`_
-
- -------------------
- Ongoing Development
- -------------------
-
- Development on Hypothesis is a mix of community provided and sponsored. If you wish to contribute,
- either financially or through code, `you can read more about the process in the documentation
- <http://hypothesis.readthedocs.org/en/latest/development.html>`_.
-
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
-Classifier: Operating System :: Unix
-Classifier: Operating System :: POSIX
-Classifier: Operating System :: Microsoft :: Windows
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Software Development :: Testing
diff --git a/README.rst b/README.rst
index ab6bb37..3853c8f 100644
--- a/README.rst
+++ b/README.rst
@@ -26,6 +26,9 @@ examples of usage are `available at readthedocs <https://hypothesis.readthedocs.
If you want to talk to people about using Hypothesis, `we have both an IRC channel
and a mailing list <https://hypothesis.readthedocs.org/en/latest/community.html>`_.
+If you want to receive occasional updates about Hypothesis, including useful tips and tricks, there's a
+`TinyLetter mailing list to sign up for them <http://tinyletter.com/DRMacIver/>`_.
+
If you want to contribute to Hypothesis, `instructions are here <https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst>`_.
If you're looking for inspiration for writing your own QuickCheck clone,
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..60a421e
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,64 @@
+environment:
+ global:
+ # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
+ # /E:ON and /V:ON options are not enabled in the batch script intepreter
+ # See: http://stackoverflow.com/a/13751649/163740
+ CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\scripts\\run_with_env.cmd"
+
+ matrix:
+ - PYTHON: "C:\\Python27"
+ PYTHON_VERSION: "2.7.8"
+ PYTHON_ARCH: "32"
+
+ - PYTHON: "C:\\Python27-x64"
+ PYTHON_VERSION: "2.7.8"
+ PYTHON_ARCH: "64"
+
+ - PYTHON: "C:\\Python33"
+ PYTHON_VERSION: "3.3.5"
+ PYTHON_ARCH: "32"
+
+ - PYTHON: "C:\\Python33-x64"
+ PYTHON_VERSION: "3.3.5"
+ PYTHON_ARCH: "64"
+
+# - PYTHON: "C:\\Python34"
+# PYTHON_VERSION: "3.4.1"
+# PYTHON_ARCH: "32"
+
+# - PYTHON: "C:\\Python34-x64"
+# PYTHON_VERSION: "3.4.1"
+# PYTHON_ARCH: "64"
+
+install:
+ - ECHO "Filesystem root:"
+ - ps: "ls \"C:/\""
+
+ - ECHO "Installed SDKs:"
+ - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
+
+ # Install Python (from the official .msi of http://python.org) and pip when
+ # not already installed.
+ - "powershell ./scripts/install.ps1"
+
+ # Prepend newly installed Python to the PATH of this build (this cannot be
+ # done from inside the powershell script as it would require to restart
+ # the parent CMD process).
+ - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
+
+ # Check that we have the expected version and architecture for Python
+ - "python --version"
+ - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
+ - "%CMD_IN_ENV% python -m pip install --upgrade setuptools pip"
+ - "%CMD_IN_ENV% python -m pip install setuptools pytest==2.8.0 flaky"
+ - "%CMD_IN_ENV% python -m pip install .[all]"
+
+build: false # Not a C# project, build stuff at the test step instead.
+
+test_script:
+ # Build the compiled extension and run the project tests
+ - "%CMD_IN_ENV% python -m pytest tests/cover"
+ - "%CMD_IN_ENV% python -m pytest tests/datetime"
+ - "%CMD_IN_ENV% python -m pytest tests/fakefactory"
+ - "%CMD_IN_ENV% python -m pip uninstall flaky -y"
+ - "%CMD_IN_ENV% python -m pytest tests/pytest -p pytester --runpytest subprocess"
diff --git a/docs/_static/.empty b/docs/_static/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/docs/changes.rst b/docs/changes.rst
new file mode 100644
index 0000000..91a3fd7
--- /dev/null
+++ b/docs/changes.rst
@@ -0,0 +1,1264 @@
+=========
+Changelog
+=========
+
+This is a record of all past Hypothesis releases and what went into them,
+in reverse chronological order. All previous releases should still be available
+on pip.
+
+Hypothesis APIs come in three flavours:
+
+* Public: Hypothesis releases since 1.0 are `semantically versioned <http://semver.org/>`_
+ with respect to these parts of the API. These will not break except between
+ major version bumps. All APIs mentioned in this documentation are public unless
+ explicitly noted otherwise.
+* Semi-public: These are APIs that are considered ready to use but are not wholly
+ nailed down yet. They will not break in patch releases and will *usually* not break
+ in minor releases, but when necessary minor releases may break semi-public APIs.
+* Internal: These may break at any time and you really should not use them at
+ all.
+
+You should generally assume that an API is internal unless you have specific
+information to the contrary.
+
+-----------------------------------------------------------------------
+`1.18.0 <https://hypothesis.readthedocs.org/en/1.18.0/>`_ - 2015-12-21
+-----------------------------------------------------------------------
+
+Features:
+
+* Tests and find are now explicitly seeded off the global random module. This
+ means that if you nest one inside the other you will now get a health check
+ error. It also means that you can control global randomization by seeding
+ random.
+* There is a new random_module() strategy which seeds the global random module
+ for you and handles things so that you don't get a health check warning if
+ you use it inside your tests.
+* floats() now accepts two new arguments: allow_nan and allow_infinity. These
+ default to the old behaviour, but when set to False will do what the names
+ suggest.
+
+Bug fixes:
+
+* Fix a bug where tests that used text() on Python 3.4+ would not actually be
+ deterministic even when explicitly seeded or using the derandomize mode,
+ because generation depended on dictionary iteration order which was affected
+ by hash randomization.
+* Fix a bug where with complicated strategies the timing of the initial health
+ check could affect the seeding of the subsequent test, which would also
+ render supposedly deterministic tests non-deterministic in some scenarios.
+* In some circumstances flatmap() could get confused by two structurally
+ similar things it could generate and would produce a flaky test where the
+ first time it produced an error but the second time it produced the other
+ value, which was not an error. The same bug was presumably also possible in
+ composite().
+* flatmap() and composite() initial generation should now be moderately faster.
+ This will be particularly noticeable when you have many values drawn from the
+ same strategy in a single run, e.g. constructs like lists(s.flatmap(f)).
+ Shrinking performance *may* have suffered, but this didn't actually produce
+ an interestingly worse result in any of the standard scenarios tested.
+
+-----------------------------------------------------------------------
+`1.17.1 <https://hypothesis.readthedocs.org/en/1.17.1/>`_ - 2015-12-16
+-----------------------------------------------------------------------
+
+A small bug fix release, which fixes the fact that the 'note' function could
+not be used on tests which used the @example decorator to provide explicit
+examples.
+
+-----------------------------------------------------------------------
+`1.17.0 <https://hypothesis.readthedocs.org/en/1.17.0/>`_ - 2015-12-15
+-----------------------------------------------------------------------
+
+This is actually the same release as 1.16.1, but 1.16.1 has been pulled because
+it contains the following additional change that was not intended to be in a
+patch release (it's perfectly stable, but is a larger change that should have
+required a minor version bump):
+
+* Hypothesis will now perform a series of "health checks" as part of running
+ your tests. These detect and warn about some common error conditions that
+ people often run into which wouldn't necessarily have caued the test to fail
+ but would cause e.g. degraded performance or confusing results.
+
+-----------------------------------------------------------------------
+`1.16.1 <https://hypothesis.readthedocs.org/en/1.16.1/>`_ - 2015-12-14
+-----------------------------------------------------------------------
+
+Note: This release has been removed.
+
+A small bugfix release that allows bdists for Hypothesis to be built
+under 2.7 - the compat3.py file which had Python 3 syntax wasn't intended
+to be loaded under Python 2, but when building a bdist it was. In particular
+this would break running setup.py test.
+
+-----------------------------------------------------------------------
+`1.16.0 <https://hypothesis.readthedocs.org/en/1.16.0/>`_ - 2015-12-08
+-----------------------------------------------------------------------
+
+There are no public API changes in this release but it includes a behaviour
+change that I wasn't comfortable putting in a patch release.
+
+* Functions from hypothesis.strategies will no longer raise InvalidArgument
+ on bad arguments. Instead the same errors will be raised when a test
+ using such a strategy is run. This may improve startup time in some
+ cases, but the main reason for it is so that errors in strategies
+ won't cause errors in loading, and it can interact correctly with things
+ like pytest.mark.skipif.
+* Errors caused by accidentally invoking the legacy API are now much less
+ confusing, although still throw NotImplementedError.
+* hypothesis.extra.django is 1.9 compatible.
+* When tests are run with max_shrinks=0 this will now still rerun the test
+ on failure and will no longer print "Trying example:" before each run.
+ Additionally note() will now work correctly when used with max_shrinks=0.
+
+-----------------------------------------------------------------------
+`1.15.0 <https://hypothesis.readthedocs.org/en/1.15.0/>`_ - 2015-11-24
+-----------------------------------------------------------------------
+
+A release with two new features.
+
+* A 'characters' strategy for more flexible generation of text with particular
+ character ranges and types, kindly contributed by `Alexander Shorin <https://github.com/kxepal>`_.
+* Add support for preconditions to the rule based stateful testing. Kindly
+ contributed by `Christopher Armstrong <https://github.com/radix>`_
+
+
+-----------------------------------------------------------------------
+`1.14.0 <https://hypothesis.readthedocs.org/en/1.14.0/>`_ - 2015-11-01
+-----------------------------------------------------------------------
+
+
+New features:
+
+* Add 'note' function which lets you include additional information in the
+ final test run's output.
+* Add 'choices' strategy which gives you a choice function that emulates
+ random.choice.
+* Add 'uuid' strategy that generates UUIDs'
+* Add 'shared' strategy that lets you create a strategy that just generates a
+ single shared value for each test run
+
+Bugs:
+
+* Using strategies of the form streaming(x.flatmap(f)) with find or in stateful
+ testing would have caused InvalidArgument errors when the resulting values
+ were used (because code that expected to only be called within a test context
... 26105 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-hypothesis.git
More information about the Python-modules-commits
mailing list