def testCompressLength2(self): studentCompress = hw.compress(('1'*17 + '0'*15)*2) self.assertTrue(len(studentCompress) < len(('1'*17 + '0'*15)*2))
def testBoth2(self): studentCompress = hw.compress(('1'*17 + '0'*15)*2) studentAnswer = hw.uncompress(studentCompress) self.assertEqual(studentAnswer,('1'*17 + '0'*15)*2)
def testCompressLength1(self): studentCompress = hw.compress('1'*63 + '0') self.assertTrue(len(studentCompress) < len('1'*63 + '0'))
def testBoth1(self): studentCompress = hw.compress('1'*63 + '0') studentAnswer = hw.uncompress(studentCompress) self.assertEqual(studentAnswer,'1'*63 + '0')