diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-04 20:04:32 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-04 20:04:32 (GMT) |
commit | 9b625d3037815a6753fca21ad19711a92bebec54 (patch) | |
tree | fb81ecf74c56e24c7cd5a6e0a349042a5383cea5 /Lib/test/test_doctest.py | |
parent | 8485b562164304d068dfac4cee0f5108251eda55 (diff) | |
download | cpython-9b625d3037815a6753fca21ad19711a92bebec54.zip cpython-9b625d3037815a6753fca21ad19711a92bebec54.tar.gz cpython-9b625d3037815a6753fca21ad19711a92bebec54.tar.bz2 |
Example.__init__: this cannot use assert, because that fails to trigger
in a -O run, and so test_doctest was failing under -O. Simple cause,
simple cure.
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r-- | Lib/test/test_doctest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index 68ac44c..1062942 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -132,13 +132,13 @@ than one line: >>> e = doctest.Example('print 1', '1\n', 0) >>> e = doctest.Example('print 1\n', '1\n', 0) Traceback (most recent call last): - AssertionError + AssertionError: source must end with newline iff source contains more than one line >>> # Source spans multiple lines: require terminating newline. >>> e = doctest.Example('print 1;\nprint 2\n', '1\n2\n', 0) >>> e = doctest.Example('print 1;\nprint 2', '1\n2\n', 0) Traceback (most recent call last): - AssertionError + AssertionError: source must end with newline iff source contains more than one line The `want` string should be terminated by a newline, unless it's the empty string: @@ -146,7 +146,7 @@ empty string: >>> e = doctest.Example('print 1', '1\n', 0) >>> e = doctest.Example('print 1', '1', 0) Traceback (most recent call last): - AssertionError + AssertionError: non-empty want must end with newline >>> e = doctest.Example('print', '', 0) """ |