'NumPy silently truncates strings to fix inside charseq'

def test_py_argument_char_seq_truncate(self):

    pyfunc = set_charseq
    rectype = numpy_support.from_dtype(recordwithcharseq)
    cres = compile_isolated(pyfunc, (rectype[:], types.intp, rectype.typeof('n')))
    cfunc = cres.entry_point
    cs_overflowed = 'abcdef'
    pyfunc(self.refsample1d, 1, cs_overflowed)
    cfunc(self.nbsample1d, 1, cs_overflowed)
    np.testing.assert_equal(self.refsample1d, self.nbsample1d)
    self.assertEqual(self.refsample1d[1].n, cs_overflowed[:(-1)].encode('ascii'))
