From 84e8d428714b5348c14a762fec75cce26a1f1e68 Mon Sep 17 00:00:00 2001 From: bt3gl Date: Wed, 26 Nov 2014 13:34:23 -0500 Subject: [PATCH] doctest simple example --- src/useful_scripts/doctest_example.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/useful_scripts/doctest_example.py diff --git a/src/useful_scripts/doctest_example.py b/src/useful_scripts/doctest_example.py new file mode 100644 index 0000000..104fc14 --- /dev/null +++ b/src/useful_scripts/doctest_example.py @@ -0,0 +1,11 @@ +''' +The doctest module automatically runs any statement begining with >>> +and compares the following line with the output from the interpreter. + +>>> 1 == 1 +False +''' + +if __name__ == '__main__': + import doctest + doctest.testmod() \ No newline at end of file