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
39d795d8
Commit
39d795d8
authored
Aug 08, 2010
by
Florent Xicluna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #7564: Skip test_ioctl if another process is attached to /dev/tty.
parent
e7eaec69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
Lib/test/test_ioctl.py
Lib/test/test_ioctl.py
+9
-1
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/test_ioctl.py
View file @
39d795d8
...
...
@@ -7,9 +7,17 @@ get_attribute(termios, 'TIOCGPGRP') #Can't run tests without this feature
try
:
tty
=
open
(
"/dev/tty"
,
"r"
)
tty
.
close
()
except
IOError
:
raise
unittest
.
SkipTest
(
"Unable to open /dev/tty"
)
else
:
# Skip if another process is in foreground
r
=
fcntl
.
ioctl
(
tty
,
termios
.
TIOCGPGRP
,
" "
)
tty
.
close
()
rpgrp
=
struct
.
unpack
(
"i"
,
r
)[
0
]
if
rpgrp
not
in
(
os
.
getpgrp
(),
os
.
getsid
(
0
)):
raise
unittest
.
SkipTest
(
"Neither the process group nor the session "
"are attached to /dev/tty"
)
del
tty
,
r
,
rpgrp
try
:
import
pty
...
...
Misc/NEWS
View file @
39d795d8
...
...
@@ -136,6 +136,8 @@ Tools/Demos
Tests
-----
- Issue #7564: Skip test_ioctl if another process is attached to /dev/tty.
- Issue #8433: Fix test_curses failure with newer versions of ncurses.
- Issue #9496: Provide a test suite for the rlcompleter module. Patch by
...
...
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