diff options
author | pierregm <pierregm@localhost> | 2009-02-14 22:42:29 +0000 |
---|---|---|
committer | pierregm <pierregm@localhost> | 2009-02-14 22:42:29 +0000 |
commit | b4b2d63b15f694ff9fc469f366af5b9a2e3653fc (patch) | |
tree | 177820b790222e983fa0672e6f5e071c011aac53 /numpy/lib/tests/test__iotools.py | |
parent | c1877cb6d2f56a817fcbc046820abcc338302d3f (diff) | |
download | numpy-b4b2d63b15f694ff9fc469f366af5b9a2e3653fc.tar.gz |
* genfromtxt : fixed case when using explicit converters and explicit dtype.
Diffstat (limited to 'numpy/lib/tests/test__iotools.py')
-rw-r--r-- | numpy/lib/tests/test__iotools.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/lib/tests/test__iotools.py b/numpy/lib/tests/test__iotools.py index bb1483186..2cb8461c3 100644 --- a/numpy/lib/tests/test__iotools.py +++ b/numpy/lib/tests/test__iotools.py @@ -142,6 +142,14 @@ class TestStringConverter(TestCase): assert_equal(test, date(2009, 01, 01)) test = convert('') assert_equal(test, date(2000, 01, 01)) + # + def test_string_to_object(self): + "Make sure that string-to-object functions are properly recognized" + from datetime import date + import time + conv = StringConverter(lambda s: date(*(time.strptime(s)[:3]))) + assert_equal(conv._mapper[-2][0](0), 0j) + assert(hasattr(conv, 'default')) #------------------------------------------------------------------------------- |