Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive test scripts for Qt/nb issues #1127

Closed
minrk opened this issue Dec 8, 2011 · 2 comments
Closed

Interactive test scripts for Qt/nb issues #1127

minrk opened this issue Dec 8, 2011 · 2 comments

Comments

@minrk
Copy link
Member

minrk commented Dec 8, 2011

Our ability to test qt and notebook code, due to its inherently human-interactive nature is sorely lacking. I know there are web and Qt testing tools, but what might provide a crude solution in the meantime would be to track some test scripts and notebooks, so that we have samples to run to more reliably evaluate whether things are well behaved.

For instance, for the recent carriage-return work in the qtconsole, we have the following cases:

Show that CR action properly overwrites lines:

for i in range(10):
    print '\r%s' % (i*str(i)),
    sys.stdout.flush()
    time.sleep(0.5)

CR clears whole lines, unlike the terminal:

for i in range(9,1,-1):
    print '\r%s' % (i*str(i)),
    sys.stdout.flush()
    time.sleep(0.5)

CRLF is treated as a newline:

for i in range(10):
    print '%s\r\n' % (i*str(i)),
    sys.stdout.flush()
    time.sleep(0.5)

Which we could run, with either %loadpy, or do as a Demo.

Perhaps we should keep these in examples/tests/?

@takluyver
Copy link
Member

That definitely sounds like a good idea.

@minrk
Copy link
Member Author

minrk commented Jan 19, 2013

This doesn't need to stay open as an Issue, closing.

@minrk minrk closed this as completed Jan 19, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants