Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bfbae77c
Commit
bfbae77c
authored
Nov 03, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Branch merge
parents
9bdf822e
1a9a758a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
Doc/library/curses.rst
Doc/library/curses.rst
+1
-1
Lib/test/test_curses.py
Lib/test/test_curses.py
+6
-1
Lib/test/test_httpservers.py
Lib/test/test_httpservers.py
+6
-2
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_cursesmodule.c
Modules/_cursesmodule.c
+1
-1
No files found.
Doc/library/curses.rst
View file @
bfbae77c
...
...
@@ -566,7 +566,7 @@ The module :mod:`curses` defines the following functions:
Instantiate the string *str* with the supplied parameters, where *str* should
be a parameterized string obtained from the terminfo database. E.g.
``tparm(tigetstr("cup"), 5, 3)`` could result in ``'\033[6;4H'``, the exact
``tparm(tigetstr("cup"), 5, 3)`` could result in ``
b
'\033[6;4H'``, the exact
result depending on terminal type.
...
...
Lib/test/test_curses.py
View file @
bfbae77c
...
...
@@ -190,7 +190,7 @@ def module_funcs(stdscr):
curses
.
tigetflag
(
'hc'
)
curses
.
tigetnum
(
'co'
)
curses
.
tigetstr
(
'cr'
)
curses
.
tparm
(
'cr'
)
curses
.
tparm
(
b
'cr'
)
curses
.
typeahead
(
sys
.
__stdin__
.
fileno
())
curses
.
unctrl
(
'a'
)
curses
.
ungetch
(
'a'
)
...
...
@@ -264,6 +264,10 @@ def test_issue6243(stdscr):
curses
.
ungetch
(
1025
)
stdscr
.
getkey
()
def
test_issue10570
():
b
=
curses
.
tparm
(
curses
.
tigetstr
(
"cup"
),
5
,
3
)
assert
type
(
b
)
is
bytes
def
main
(
stdscr
):
curses
.
savetty
()
try
:
...
...
@@ -272,6 +276,7 @@ def main(stdscr):
test_userptr_without_set
(
stdscr
)
test_resize_term
(
stdscr
)
test_issue6243
(
stdscr
)
test_issue10570
()
finally
:
curses
.
resetty
()
...
...
Lib/test/test_httpservers.py
View file @
bfbae77c
...
...
@@ -259,8 +259,9 @@ class SimpleHTTPServerTestCase(BaseTestCase):
with
open
(
os
.
path
.
join
(
self
.
tempdir_name
,
'index.html'
),
'w'
)
as
f
:
response
=
self
.
request
(
'/'
+
self
.
tempdir_name
+
'/'
)
self
.
check_status_and_reason
(
response
,
200
)
if
os
.
name
==
'posix'
:
# chmod won't work as expected on Windows platforms
# chmod() doesn't work as expected on Windows, and filesystem
# permissions are ignored by root on Unix.
if
os
.
name
==
'posix'
and
os
.
geteuid
()
!=
0
:
os
.
chmod
(
self
.
tempdir
,
0
)
response
=
self
.
request
(
self
.
tempdir_name
+
'/'
)
self
.
check_status_and_reason
(
response
,
404
)
...
...
@@ -305,6 +306,9 @@ print("%%s, %%s, %%s" %% (form.getfirst("spam"), form.getfirst("eggs"),
form.getfirst("bacon")))
"""
@
unittest
.
skipIf
(
hasattr
(
os
,
'geteuid'
)
and
os
.
geteuid
()
==
0
,
"This test can't be run reliably as root (issue #13308)."
)
class
CGIHTTPServerTestCase
(
BaseTestCase
):
class
request_handler
(
NoLogRequestHandler
,
CGIHTTPRequestHandler
):
pass
...
...
Misc/NEWS
View file @
bfbae77c
...
...
@@ -66,6 +66,9 @@ Core and Builtins
Library
-------
- Issue #10570: curses.tigetstr() is now expecting a byte string, instead of
a Unicode string.
- Issue #2892: preserve iterparse events in case of SyntaxError.
- Issue #670664: Fix HTMLParser to correctly handle the content of
...
...
Modules/_cursesmodule.c
View file @
bfbae77c
...
...
@@ -2600,7 +2600,7 @@ PyCurses_tparm(PyObject *self, PyObject *args)
PyCursesSetupTermCalled
;
if
(
!
PyArg_ParseTuple
(
args
,
"
s
|iiiiiiiii:tparm"
,
if
(
!
PyArg_ParseTuple
(
args
,
"
y
|iiiiiiiii:tparm"
,
&
fmt
,
&
i1
,
&
i2
,
&
i3
,
&
i4
,
&
i5
,
&
i6
,
&
i7
,
&
i8
,
&
i9
))
{
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment