Skip to content

Instantly share code, notes, and snippets.

@svetlyak40wt
Created January 17, 2011 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svetlyak40wt/783584 to your computer and use it in GitHub Desktop.
Save svetlyak40wt/783584 to your computer and use it in GitHub Desktop.
Test for Pdb++ UTF-8 compatibility.
def test_utf8():
src = py.code.Source("""
# coding: utf-8
def fn():
\"\"\"тест\"\"\"
a = 1
set_trace()
return a
""")
exec src.compile()
check(fn, """
> .*fn()
-> return a
# ll
NUM def fn():
NUM \"\"\"тест\"\"\"
NUM a = 1
NUM set_trace()
NUM -> return a
# c
""".replace('NUM', ' *[0-9]*'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment