]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add test case for issue #9409, non-ascii char in doctest. It passes in 3.2 but needs...
authorFlorent Xicluna <florent.xicluna@gmail.com>
Thu, 14 Oct 2010 21:35:58 +0000 (21:35 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Thu, 14 Oct 2010 21:35:58 +0000 (21:35 +0000)
Lib/test/test_doctest.py

index c0136a6b0bee5948d020546eefb79630c0c09428..a4b7e35a386e998266fb24b222a15d43cab5cc87 100644 (file)
@@ -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: