File: 2016-09-23-hypothesis-3.5.0-release.md

package info (click to toggle)
python-hypothesis 6.138.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,272 kB
  • sloc: python: 62,853; ruby: 1,107; sh: 253; makefile: 41; javascript: 6
file content (64 lines) | stat: -rw-r--r-- 2,768 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
tags: news, python, non-technical
date: 2016-09-23 00:00
title: 3.5.0 and 3.5.1 Releases of Hypothesis for Python
author: drmaciver
---

This is a combined release announcement for two releases. 3.5.0
was released yesterday, and 3.5.1 has been released today after
some early bug reports in 3.5.0

## Changes

### 3.5.0 - 2016-09-22

This is a feature release.

* fractions() and decimals() strategies now support min_value and max_value
  parameters. Thanks go to Anne Mulhern for the development of this feature.
* The Hypothesis pytest plugin now supports a --hypothesis-show-statistics parameter
  that gives detailed statistics about the tests that were run. Huge thanks to
  [Jean-Louis Fuchs](https://github.com/ganwell) and [Adfinis-SyGroup](https://www.adfinis-sygroup.ch/)
  for funding the development of this feature.
* There is a new event() function that can be used to add custom statistics.

Additionally there have been some minor bug fixes:

* In some cases Hypothesis should produce fewer duplicate examples (this will mostly
  only affect cases with a single parameter).
* py.test command line parameters are now under an option group for Hypothesis (thanks
  to David Keijser for fixing this)
* Hypothesis would previously error if you used function annotations on your tests under
  Python 3.4.
* The repr of many strategies using lambdas has been improved to include the lambda body
  (this was previously supported in many but not all cases).


### 3.5.1 - 2016-09-23

This is a bug fix release.

* Hypothesis now runs cleanly in -B and -BB modes, avoiding mixing bytes and unicode.
* unittest.TestCase tests would not have shown up in the new statistics mode. Now they
  do.
* Similarly, stateful tests would not have shown up in statistics and now they do.
* Statistics now print with pytest node IDs (the names you'd get in pytest verbose mode).


## Notes

Aside from the above changes, there are a couple big things behind the scenes of this
release that make it a big deal.

The first is that the flagship chunk of work, statistics, is a long-standing want to
have that has never quite been prioritised. By funding it, Jean-Louis and Adfinis-SyGroup
successfully bumped it up to the top of the priority list, making it the first funded
feature in Hypothesis for Python!

Another less significant but still important is that this release marks the first real
break with an unofficial Hypothesis for Python policy of not having any dependencies
other than the standard library and backports. This release adds a dependency on the
uncompyle6 package. This may seem like an odd choice, but it was invaluable for fixing
the repr behaviour, which in turn was really needed for providing good statistics
for filter and recursive strategies.