mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
Add test case for issue #9409, non-ascii char in doctest. It passes in 3.2 but needs fixing in 2.7.
This commit is contained in:
parent
b86680e299
commit
35049443dc
1 changed files with 5 additions and 2 deletions
|
|
@ -1697,6 +1697,9 @@ def test_pdb_set_trace():
|
||||||
|
|
||||||
>>> doc = '''
|
>>> doc = '''
|
||||||
... >>> x = 42
|
... >>> x = 42
|
||||||
|
... >>> raise Exception('clé')
|
||||||
|
... Traceback (most recent call last):
|
||||||
|
... Exception: clé
|
||||||
... >>> import pdb; pdb.set_trace()
|
... >>> import pdb; pdb.set_trace()
|
||||||
... '''
|
... '''
|
||||||
>>> parser = doctest.DocTestParser()
|
>>> parser = doctest.DocTestParser()
|
||||||
|
|
@ -1716,12 +1719,12 @@ def test_pdb_set_trace():
|
||||||
>>> try: runner.run(test)
|
>>> try: runner.run(test)
|
||||||
... finally: sys.stdin = real_stdin
|
... finally: sys.stdin = real_stdin
|
||||||
--Return--
|
--Return--
|
||||||
> <doctest foo-bär@baz[1]>(1)<module>()->None
|
> <doctest foo-bär@baz[2]>(1)<module>()->None
|
||||||
-> import pdb; pdb.set_trace()
|
-> import pdb; pdb.set_trace()
|
||||||
(Pdb) print(x)
|
(Pdb) print(x)
|
||||||
42
|
42
|
||||||
(Pdb) continue
|
(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:
|
You can also put pdb.set_trace in a function called from a test:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue