File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from atbash_cipher import decode , encode
44
55
6- # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1 .0
6+ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2 .0
77
88class AtbashCipherTest (unittest .TestCase ):
99 def test_encode_no (self ):
@@ -51,6 +51,14 @@ def test_decode_all_the_letters(self):
5151 plaintext = "thequickbrownfoxjumpsoverthelazydog"
5252 self .assertMultiLineEqual (decode (ciphertext ), plaintext )
5353
54+ def test_decode_with_too_many_spaces (self ):
55+ self .assertMultiLineEqual (decode ("vc vix r hn" ), "exercism" )
56+
57+ def test_decode_with_no_spaces (self ):
58+ ciphertext = "zmlyhgzxovrhlugvmzhgvkkrmthglmv"
59+ plaintext = "anobstacleisoftenasteppingstone"
60+ self .assertMultiLineEqual (decode (ciphertext ), plaintext )
61+
5462 # additional track specific test
5563 def test_encode_decode (self ):
5664 self .assertMultiLineEqual (
You can’t perform that action at this time.
0 commit comments