summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_doctest.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-10-14 21:35:58 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-10-14 21:35:58 (GMT)
commit35049443dc2c3e51959700aa8c5359c5ce12663e (patch)
tree2f9f9dc93387d3df761eb571d990b49efb0995cc /Lib/test/test_doctest.py
parentb86680e299d7429532518a496031cb96aa2ea659 (diff)
downloadcpython-35049443dc2c3e51959700aa8c5359c5ce12663e.zip
cpython-35049443dc2c3e51959700aa8c5359c5ce12663e.tar.gz
cpython-35049443dc2c3e51959700aa8c5359c5ce12663e.tar.bz2
Add test case for issue #9409, non-ascii char in doctest. It passes in 3.2 but needs fixing in 2.7.
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r--Lib/test/test_doctest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index c0136a6..a4b7e35 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -1697,6 +1697,9 @@ def test_pdb_set_trace():
>>> doc = '''
... >>> x = 42
+ ... >>> raise Exception('clé')
+ ... Traceback (most recent call last):
+ ... Exception: clé
... >>> import pdb; pdb.set_trace()
... '''
>>> parser = doctest.DocTestParser()
@@ -1716,12 +1719,12 @@ def test_pdb_set_trace():
>>> try: runner.run(test)
... finally: sys.stdin = real_stdin
--Return--
- > <doctest foo-bär@baz[1]>(1)<module>()->None
+ > <doctest foo-bär@baz[2]>(1)<module>()->None
-> import pdb; pdb.set_trace()
(Pdb) print(x)
42
(Pdb) continue
- TestResults(failed=0, attempted=2)
+ TestResults(failed=0, attempted=3)
You can also put pdb.set_trace in a function called from a test: