numpy 1.14 has changed its output format for str and repr, changing whitespace and the number of sig figs. This breaks doctests that include direct numpy output without formatting the values explicitly.
It is possible to configure numpy 1.14 to use legacy formatting which almost always fixes the doctest problem. Adding something like the following to each test file, to the pytest conftest.py or to a test runner script is sufficient:
# Whitespace changes between numpy 1.13 and 1.14 will cause the doctests # to fail; when doctests are updated to 1.14 format, this can be removed. try: # CRUFT import numpy as np np.set_printoptions(legacy='1.13') except TypeError: pass
- python-bumps: test code changed to include above snippet
- python-periodictable: pytest's conftest.py added to include the above snippet both for runtime and autopkgtest tests