diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2015-07-28 09:36:02 -0400 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2017-09-07 16:47:39 -0400 |
commit | 50f4d0d810efbc8a3e3a4bdf8908faa9df4aa710 (patch) | |
tree | 0c5095946d694d19b0496db74f5fac0950955f19 /numpy/ma | |
parent | 7412b85a1b4920e5b72ab694e51b11e4cb615866 (diff) | |
download | numpy-50f4d0d810efbc8a3e3a4bdf8908faa9df4aa710.tar.gz |
TST: Fix/Remove old unit tests for structure assignment
Diffstat (limited to 'numpy/ma')
-rw-r--r-- | numpy/ma/tests/test_core.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index 5da19f9ca..c06a42de3 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -1760,16 +1760,12 @@ class TestFillingValues(object): assert_equal(fval.item(), [-999, -12345678.9, b"???"]) #.....Using a flexible type w/ a different type shouldn't matter - # BEHAVIOR in 1.5 and earlier: match structured types by position - #fill_val = np.array((-999, -12345678.9, "???"), - # dtype=[("A", int), ("B", float), ("C", "|S3")]) - # BEHAVIOR in 1.6 and later: match structured types by name - fill_val = np.array(("???", -999, -12345678.9), - dtype=[("c", "|S3"), ("a", int), ("b", float), ]) - # suppress deprecation warning in 1.12 (remove in 1.13) - with assert_warns(FutureWarning): - fval = _check_fill_value(fill_val, ndtype) - assert_(isinstance(fval, ndarray)) + # BEHAVIOR in 1.5 and earlier, and 1.13 and later: match structured + # types by position + fill_val = np.array((-999, -12345678.9, "???"), + dtype=[("A", int), ("B", float), ("C", "|S3")]) + fval = _check_fill_value(fill_val, ndtype) + self.assertTrue(isinstance(fval, ndarray)) assert_equal(fval.item(), [-999, -12345678.9, b"???"]) #.....Using an object-array shouldn't matter either |