-
-
Save Kwpolska/de997c9ed7e1e694b239 to your computer and use it in GitHub Desktop.
Doctests work. Really.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nikola/rc4.py b/nikola/rc4.py | |
index b46d602..e6c0c17 100644 | |
--- a/nikola/rc4.py | |
+++ b/nikola/rc4.py | |
@@ -61,6 +61,8 @@ def rc4(key, string): | |
"""Encrypt things. | |
>>> print(rc4("Key", "Plaintext")) | |
u/MW6NlArwrT | |
+ >>> 1 == 0 | |
+ True | |
""" | |
string.encode('utf8') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ py.test --doctest-modules nikola/ | |
============================= test session starts ============================== | |
platform linux -- Python 3.4.3 -- py-1.4.30 -- pytest-2.7.2 | |
rootdir: /home/kwpolska/git/nikola, inifile: | |
plugins: cov | |
collected 10 items | |
nikola/post.py . | |
nikola/rc4.py F | |
nikola/utils.py ...... | |
nikola/plugins/compile/markdown/mdx_gist.py . | |
nikola/plugins/task/sitemap/__init__.py . | |
=================================== FAILURES =================================== | |
___________________________ [doctest] nikola.rc4.rc4 ___________________________ | |
061 """Encrypt things. | |
062 >>> print(rc4("Key", "Plaintext")) | |
063 u/MW6NlArwrT | |
064 >>> 1 == 0 | |
Expected: | |
True | |
Got: | |
False | |
/home/kwpolska/git/nikola/nikola/rc4.py:64: DocTestFailure | |
====================== 1 failed, 9 passed in 5.54 seconds ====================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment