diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-10-20 17:15:51 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-10-20 17:15:51 -0700 |
commit | 11a931bbb935d9fe74c9b6382463f0ab840d0992 (patch) | |
tree | 8985294e0e6ac7d93a1167e7367702f88f2cf21e /numpy/lib/tests | |
parent | 55d3ef5b81b709cc9d8ad6b13f75ca0f05f65276 (diff) | |
parent | 0d284764a855cae11699228ff1b81e6d18f38ed2 (diff) | |
download | numpy-11a931bbb935d9fe74c9b6382463f0ab840d0992.tar.gz |
Merge pull request #3953 from WarrenWeckesser/savetxt-bad-fmt-error
MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.
Diffstat (limited to 'numpy/lib/tests')
-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. |