From e2044fd0989dded2a82dd76b2e1b440989aee9ef Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Fri, 11 Jul 2014 12:34:09 +0100 Subject: [PATCH] Moved a slide around, added project directories --- cipher.sublime-project | 4 ++++ slides/pocket-enigma-encipher.html | 36 +++++++++++++++--------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/cipher.sublime-project b/cipher.sublime-project index c051f12..54c826f 100644 --- a/cipher.sublime-project +++ b/cipher.sublime-project @@ -4,6 +4,10 @@ { "follow_symlinks": true, "path": "slides" + }, + { + "follow_symlinks": true, + "path": "." } ] } diff --git a/slides/pocket-enigma-encipher.html b/slides/pocket-enigma-encipher.html index 05222c5..b569911 100644 --- a/slides/pocket-enigma-encipher.html +++ b/slides/pocket-enigma-encipher.html @@ -105,24 +105,6 @@ What data should it hold? --- -# A note on testing - -Testing's easier if everything returns a meaningful value - -Saves having to look up different values after performing each operation - -`__init__` can't return a value (restriction of Python) - -```python -if __name__ == "__main__": - import doctest - doctest.testmod(extraglobs={'pe': PocketEnigma(1, 'a')}) -``` - -`pe` is now available in all tests. - ---- - # Data structures What's a convenient representation of the wheel @@ -203,6 +185,24 @@ class PocketEnigma(object): --- +# A note on testing + +Testing's easier if everything returns a meaningful value + +Saves having to look up different values after performing each operation + +`__init__` can't return a value (restriction of Python) + +```python +if __name__ == "__main__": + import doctest + doctest.testmod(extraglobs={'pe': PocketEnigma(1, 'a')}) +``` + +`pe` is now available in all tests. + +--- + # Looking up the enciphered version of a letter *Not* advancing the wheel before -- 2.34.1