diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2013-10-20 10:56:27 -0400 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2013-10-20 10:56:27 -0400 |
commit | 0d284764a855cae11699228ff1b81e6d18f38ed2 (patch) | |
tree | 8985294e0e6ac7d93a1167e7367702f88f2cf21e /numpy/lib/tests/test_io.py | |
parent | 55d3ef5b81b709cc9d8ad6b13f75ca0f05f65276 (diff) | |
download | numpy-0d284764a855cae11699228ff1b81e6d18f38ed2.tar.gz |
MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r-- | numpy/lib/tests/test_io.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 9a119e79a..66310a509 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -327,6 +327,10 @@ class TestSaveTxt(TestCase): lines = c.readlines() assert_equal(lines, [b'01 : 2.0\n', b'03 : 4.0\n']) + # Bad fmt, should raise a ValueError + c = BytesIO() + assert_raises(ValueError, np.savetxt, c, a, fmt=99) + def test_header_footer(self): """ Test the functionality of the header and footer keyword argument. |