def test_isinstance(self): s = b'abc' self.assertTrue(isinstance(s, basestring)) s2 = oldstr(b'abc') self.assertTrue(isinstance(s2, basestring))