Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Unified Diff: Lib/test/test_curses.py

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_capi.py ('k') | Lib/test/test_os.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_curses.py Thu Dec 27 23:52:36 2012 +0200
+++ b/Lib/test/test_curses.py Thu Dec 27 17:35:12 2012 -0500
@@ -169,11 +169,16 @@
curses.delay_output(1)
curses.echo() ; curses.echo(1)
- f = tempfile.TemporaryFile()
+ fx = tempfile.TemporaryFile()
+ # cf tempfile.py TemporaryFile vs NamedTemporaryFile
+ if os.name != 'posix' or os.sys.platform == 'cygwin':
+ f = fx.file
+ else:
+ f = fx
stdscr.putwin(f)
f.seek(0)
curses.getwin(f)
- f.close()
+ fx.close()
curses.halfdelay(1)
curses.intrflush(1)
@@ -289,7 +294,11 @@
raise AssertionError("%r != %r" % (read, ch))
def test_issue10570():
- b = curses.tparm(curses.tigetstr("cup"), 5, 3)
+ cap = curses.tigetstr("cup")
+ # return if cup capability is not supported
+ if cap is None:
+ return
+ b = curses.tparm(cap, 5, 3)
assert type(b) is bytes
curses.putp(b)
« no previous file with comments | « Lib/test/test_capi.py ('k') | Lib/test/test_os.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+