[Numpy-svn] [numpy/numpy] 7747c3: BUG: Fix thinko in assert_deprecated()
GitHub
noreply at github.com
Sat Dec 12 03:01:03 EST 2015
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: 7747c3a88cb0cad5687093d1345efcb2743fc1d5
https://github.com/numpy/numpy/commit/7747c3a88cb0cad5687093d1345efcb2743fc1d5
Author: Boxiang Sun <daetalusun at gmail.com>
Date: 2015-12-12 (Sat, 12 Dec 2015)
Changed paths:
M numpy/core/tests/test_deprecations.py
Log Message:
-----------
BUG: Fix thinko in assert_deprecated()
assert_deprecated() was recently reworked for stylistic changes (in
0aa32608 "STY: Minor style cleanups in tests and C code.") but made a
thinko - `lst` is already a list of warnings, so we don't need to put
that into [] braces when preparing assertion text. If we do the
reporting breaks:
In [1]: msg = "4 warnings found but 3 expected."
In [2]: lst = ['CategoryA', 'CategoryB', 'CategoryC']
In [3]: n.join([msg] + [lst])
TypeError Traceback (most recent call last)
----> 1 n.join([msg] + [lst])
TypeError: sequence item 1: expected string, list found
Fix it.
Cc: Charles Harris <charlesr.harris at gmail.com>
Commit: 623fdd95cf1505fb867cab0040d68714422ac1bf
https://github.com/numpy/numpy/commit/623fdd95cf1505fb867cab0040d68714422ac1bf
Author: Nathaniel J. Smith <njs at pobox.com>
Date: 2015-12-12 (Sat, 12 Dec 2015)
Changed paths:
M numpy/core/tests/test_deprecations.py
Log Message:
-----------
Merge pull request #6791 from Daetalus/bug_fixing
BUG: Fix thinko in assert_deprecated()
Compare: https://github.com/numpy/numpy/compare/90a1a9fe056d...623fdd95cf15
More information about the Numpy-svn
mailing list