[Debichem-devel] New version of python-numpy breaks autopkgtests of python-ase in testing
Stuart Prescott
stuart at debian.org
Wed May 9 03:09:02 BST 2018
Hi
> With a recent upload of python-numpy the autopkgtest of python-ase
> started to fail in testing [2]. This is currently delaying the migration
> of python-numpy version 1:1.14.3-2 [3].
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
(including the numpy developers in this so that they can forward this info to
any other lost souls)
cheers
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ stuart at nanonanonano.net
Debian Developer http://www.debian.org/ stuart at debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
More information about the Debichem-devel
mailing list