Skip to content

Commit f443f64

Browse files
thomasjpfancmccandless
authored andcommitted
atbash-cipher: updates tests to v1.2.0 (exercism#1485)
Resolves exercism#1469
1 parent 11fa3cf commit f443f64

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

exercises/atbash-cipher/atbash_cipher_test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from 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

88
class 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(

0 commit comments

Comments
 (0)