Skip to content

Commit

Permalink
Updated tests to include 5 char grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
artemisbeta authored and artemisbeta committed Feb 5, 2018
1 parent 6613da8 commit 74e9910
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name = 'enigma' ,
version = '1.1.0' ,
version = '1.1.4' ,
description = 'Enigma Machine Emulator for Python.' ,
url = 'http://github.com/artemis-beta/enigma' ,
author = 'Kristian Zarebski' ,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_enigma3.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def make_machine():
machine = make_machine()
logger.debug("Encrypting %s", phrase)
result = machine.type_phrase(phrase)

logger.debug("Finding Original")
machine = make_machine()
orig = machine.type_phrase(result)
_out = machine.type_phrase(result).replace(' ', '') # Undo 5 letter grouping
orig = _out[:len(phrase)] # Remove extra added chars in groupings
logger.debug(
"Key '%s'\n -> Running Enigma: Phrase Conversion %s -----> %s ------> %s", key, phrase, result, orig)
logger.debug("Machine type: %s" % machine.type)
assert phrase == orig, "ERROR: Reverse Encryption Does Not Match Original Phrase"
assert phrase == orig, "ERROR: Reverse Encryption '{}' Does Not Match Original Phrase '{}'".format(orig, phrase)

@given(
key=strategies.text(alphabet=string.ascii_uppercase, max_size=10),
Expand Down

0 comments on commit 74e9910

Please sign in to comment.