diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-06 22:02:59 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-06 22:02:59 (GMT) |
commit | 19397e5ec549e5281b33aa5795b517006c00f64d (patch) | |
tree | 65d1fe38b4fd47d537c45f505186666c7c7b45b2 /Lib/test/test_doctest.txt | |
parent | 98bd1814e24434ca9961dddc71bf21db67211ab9 (diff) | |
download | cpython-19397e5ec549e5281b33aa5795b517006c00f64d.zip cpython-19397e5ec549e5281b33aa5795b517006c00f64d.tar.gz cpython-19397e5ec549e5281b33aa5795b517006c00f64d.tar.bz2 |
Merging from tim-doctest-branch, which is now closed.
This primarily adds more powerful ways to work with unittest, including
spiffy support for building suites out of doctests in non-Python
"text files".
Diffstat (limited to 'Lib/test/test_doctest.txt')
-rw-r--r-- | Lib/test/test_doctest.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_doctest.txt b/Lib/test/test_doctest.txt new file mode 100644 index 0000000..f8e851e --- /dev/null +++ b/Lib/test/test_doctest.txt @@ -0,0 +1,17 @@ +This is a sample doctest in a text file. + +In this example, we'll rely on a global variable being set for us +already: + + >>> favorite_color + 'blue' + +We can make this fail by disabling the blank-line feature. + + >>> if 1: + ... print 'a' + ... print + ... print 'b' + a + <BLANKLINE> + b |