()
| 287 | |
| 288 | |
| 289 | def test_unicode_with_converter(): |
| 290 | txt = StringIO("cat,dog\nαβγ,δεζ\nabc,def\n") |
| 291 | conv = {0: lambda s: s.upper()} |
| 292 | res = np.loadtxt( |
| 293 | txt, |
| 294 | dtype=np.dtype("U12"), |
| 295 | converters=conv, |
| 296 | delimiter=",", |
| 297 | encoding=None |
| 298 | ) |
| 299 | expected = np.array([['CAT', 'dog'], ['ΑΒΓ', 'δεζ'], ['ABC', 'def']]) |
| 300 | assert_equal(res, expected) |
| 301 | |
| 302 | |
| 303 | def test_converter_with_structured_dtype(): |
nothing calls this directly
no test coverage detected