def testCreationFromOct(self): s = BitArray(oct='7') self.assertEqual(s.oct, '0o7') self.assertEqual(s.bin, '0b111') s.append('0o1') self.assertEqual(s.bin, '0b111001') s.oct = '12345670' self.assertEqual(s.length, 24) self.assertEqual(s.bin, '0b001010011100101110111000') s = BitArray('0o123') self.assertEqual(s.oct, '0o123')
def testCreationFromOct(self): s = BitArray(oct="7") self.assertEqual(s.oct, "7") self.assertEqual(s.bin, "111") s.append("0o1") self.assertEqual(s.bin, "111001") s.oct = "12345670" self.assertEqual(s.length, 24) self.assertEqual(s.bin, "001010011100101110111000") s = BitArray("0o123") self.assertEqual(s.oct, "123")
def testCreationFromOct(self): s = BitArray(oct='7') self.assertEqual(s.oct, '7') self.assertEqual(s.bin, '111') s.append('0o1') self.assertEqual(s.bin, '111001') s.oct = '12345670' self.assertEqual(s.length, 24) self.assertEqual(s.bin, '001010011100101110111000') s = BitArray('0o123') self.assertEqual(s.oct, '123')