feat: encoding works but with only same length text and key and only alphabet values test: added asserts to test

This commit is contained in:
zimmersandro committed 2026-03-04 21:23:22 +01:00
1 parent ee9265d00c
commit 76e5f47d64
2 files changed
+24 -4

No files matched your search

+13 -2
View File
@@ -1,5 +1,16 @@
"""from src.codewars.kata_cipher_helper import *
from src.codewars.kata_cipher_helper import VigenereCipher
def test_cipher_helper():
pass"""
abc = "abcdefghijklmnopqrstuvwxyz"
key = "password"
c = VigenereCipher(key, abc)
assert c.encode("codewars") == "rovwsoiv"
assert c.decode("rovwsoiv") == "codewars"
assert c.encode("waffles") == "laxxhsj"
assert c.decode("laxxhsj") == "waffles"
assert c.encode("CODEWARS") == "CODEWARS"
assert c.decode("CODEWARS") == "CODEWARS"