diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2011-03-11 09:40:33 +0200 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2011-03-11 09:40:33 +0200 |
commit | 87e0f5576f80cc3314ae368edae3461ec5c1b188 (patch) | |
tree | 89178833f79bcc4e98a94a8f9691a665b5e47f88 /numpy/lib/tests/test_regression.py | |
parent | 81fbb517544bdae0af202de2be7f4af34e29e509 (diff) | |
parent | 7bb54efde16bc81ee4eedd77828edc54c12dec75 (diff) | |
download | numpy-87e0f5576f80cc3314ae368edae3461ec5c1b188.tar.gz |
Merge remote branch 'upstream/master' into f2py-assumed-shape
* upstream/master: (310 commits)
REL: add 1.6.0 release notes.
DEP: remove deprecated np.lib.ufunclike.log2 function.
DOC: fix typo in test guidelines.
DEP: remove deprecated items from ma/core.py
DEP: remove deprecated get_numpy_include.
DEP: remove unique1d, setmember1d and intersect1d_nu.
DEP: remove deprecated names in fftpack.
DEP: remove deprecated methods sync() and close() from memmap.
DEP: Update deprecation messages in genloadtxt with a version number.
BLD: update C API version again after Mark's renaming of functions.
DOC: Replace 'deprecated' with 'superceded' in a few places, fix a typo.
STY: Remove a micro-optimization to make code more clear
DOC: Add some missing documentation, hyper-link the iterator documentation
API: Remove PyArray_FillWithZero from public API
API: Rename the iterator function pointer types to be more consistent with NumPy convention
STY: Work around lack of variadic macros in debug tracing
API: Change iterator API parameters ndim and niter from npy_intp to int
ENH: add Intel 64-bit C compiler. Closes #960.
TST: fix two divide-by-zero test warnings.
BUG: Broadcast shape was backwards in error message (Ticket #1762)
...
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r-- | numpy/lib/tests/test_regression.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index a67355957..ea4d75f6b 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -70,8 +70,8 @@ class TestRegression(TestCase): """Ticket #554""" x = np.poly1d([1,2,3]) y = np.poly1d([3,4]) - assert x != y - assert x == x + assert_(x != y) + assert_(x == x) def test_mem_insert(self, level=rlevel): """Ticket #572""" @@ -152,34 +152,34 @@ class TestRegression(TestCase): def test_void_coercion(self, level=rlevel): dt = np.dtype([('a','f4'),('b','i4')]) x = np.zeros((1,),dt) - assert(np.r_[x,x].dtype == dt) + assert_(np.r_[x,x].dtype == dt) def test_who_with_0dim_array(self, level=rlevel) : """ticket #1243""" import os, sys + oldstdout = sys.stdout sys.stdout = open(os.devnull, 'w') - try : - tmp = np.who({'foo' : np.array(1)}) - sys.stdout = sys.__stdout__ - except : - sys.stdout = sys.__stdout__ - raise AssertionError("ticket #1243") + try: + try: + tmp = np.who({'foo' : np.array(1)}) + except: + raise AssertionError("ticket #1243") + finally: + sys.stdout = oldstdout def test_bincount_empty(self): """Ticket #1387: empty array as input for bincount.""" assert_raises(ValueError, lambda : np.bincount(np.array([], dtype=np.intp))) - @dec.deprecated() def test_include_dirs(self): """As a sanity check, just test that get_include and get_numarray_include include something reasonable. Somewhat related to ticket #1405.""" - include_dirs = [np.get_include(), np.get_numarray_include(), - np.get_numpy_include()] + include_dirs = [np.get_include(), np.get_numarray_include()] for path in include_dirs: - assert isinstance(path, (str, unicode)) - assert path != '' + assert_(isinstance(path, (str, unicode))) + assert_(path != '') def test_polyder_return_type(self): """Ticket #1249""" |