def testEndsWith(self): a = Bits('0x1234abcd') self.assertTrue(a.endswith('0x123')) self.assertFalse(a.endswith('0xabcd'))