def test_str(self): s1 = oldstr(b'abc') self.assertEqual(str(s1), 'abc') s2 = oldstr(b'abc\ndef') self.assertEqual(str(s2), 'abc\ndef')