示例#1
0
 def testDecipherStr3(self):
     self.assertEqual(
         hw.decipher(
             'Ftdqq efmfuefuoumze sa agf tgzfuzs fasqftqd. Mrfqd m ituxq ftqk ebaf m eaxufmdk dmnnuf. Ftq rudef efmfuefuoumz fmwqe muy mzp ahqdetaafe. Ftq eqoazp muye mzp gzpqdetaafe. Ftq ftudp etagfe agf, Iq saf tuy!'
         ),
         'Three statisticians go out hunting together. After a while they spot a solitary rabbit. The first statistician takes aim and overshoots. The second aims and undershoots. The third shouts out, We got him!'
     )
示例#2
0
 def testDecipherStr3(self):
     self.assertEqual(
         hw.decipher(
             "Ftdqq efmfuefuoumze sa agf tgzfuzs fasqftqd. Mrfqd m ituxq ftqk ebaf m eaxufmdk dmnnuf. Ftq rudef efmfuefuoumz fmwqe muy mzp ahqdetaafe. Ftq eqoazp muye mzp gzpqdetaafe. Ftq ftudp etagfe agf, Iq saf tuy!"
         ),
         "Three statisticians go out hunting together. After a while they spot a solitary rabbit. The first statistician takes aim and overshoots. The second aims and undershoots. The third shouts out, We got him!",
     )
示例#3
0
 def testDecipherStr2(self):
     self.assertEqual(
         hw.decipher(
             'Fs jizhfynts nx bmfy nx qjky fkyjw dtz ktwljy jajwdymnsl dtz qjfwsji.'
         ),
         'An education is what is left after you forget everything you learned.'
     )
示例#4
0
 def testDecipherStr4(self):
     self.assertEqual(hw.decipher("Gurl jbex vg bhg jvgu n crapvy!"), "They work it out with a pencil!")
示例#5
0
 def testDecipherStr2(self):
     self.assertEqual(
         hw.decipher("Fs jizhfynts nx bmfy nx qjky fkyjw dtz ktwljy jajwdymnsl dtz qjfwsji."),
         "An education is what is left after you forget everything you learned.",
     )
示例#6
0
 def testDecipherStr1(self):
     self.assertEqual(hw.decipher("Bzdrzq bhogdq? H oqdedq Bzdrzq rzkzc."), "Caesar cipher? I prefer Caesar salad.")
示例#7
0
 def testDecipherEmpty(self):
     self.assertEqual(hw.decipher(""), "")
示例#8
0
 def testDecipherStr4(self):
     self.assertEqual(hw.decipher('Gurl jbex vg bhg jvgu n crapvy!'),
                      'They work it out with a pencil!')
示例#9
0
 def testDecipherStr1(self):
     self.assertEqual(hw.decipher('Bzdrzq bhogdq? H oqdedq Bzdrzq rzkzc.'),
                      'Caesar cipher? I prefer Caesar salad.')
示例#10
0
 def testDecipherEmpty(self):
     self.assertEqual(hw.decipher(''), '')