From: Neil Smith Date: Fri, 11 Jul 2014 11:34:09 +0000 (+0100) Subject: Moved a slide around, added project directories X-Git-Url: https://git.njae.me.uk/?p=cipher-training.git;a=commitdiff_plain;h=e2044fd0989dded2a82dd76b2e1b440989aee9ef Moved a slide around, added project directories --- 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