Last active
December 10, 2015 22:48
-
-
Save bukzor/4504742 to your computer and use it in GitHub Desktop.
Try to assert that the pudb ctrl+p interaction works as intended.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"pudb test script" | |
def main(): | |
"The entry point" | |
from pudb.debugger import Debugger | |
import urwid.html_fragment | |
dbg = Debugger() | |
screen = urwid.html_fragment.HtmlGenerator() | |
screen.sizes = [ (80, 24) ] *2 | |
screen.keys = [ ("ctrl p",) ] | |
dbg.ui.screen = screen | |
dbg.ui.setup_palette(screen) | |
try: | |
dbg._runscript('trivial.py') | |
except urwid.main_loop.ExitMainLoop: | |
pass | |
# Show the equivalent html. | |
#print '\n'.join(screen.fragments) | |
assert dbg.ui.preferences.shown == True | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm assuming the contents of
trivial.py
don't matter here.