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
7ba8cdc3
Commit
7ba8cdc3
authored
Jan 06, 2015
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23168: skip sys.stdin.seek() test if stdin is not a TTY
parent
6fcb9a51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
Lib/test/test_file2k.py
Lib/test/test_file2k.py
+14
-8
No files found.
Lib/test/test_file2k.py
View file @
7ba8cdc3
...
@@ -230,14 +230,20 @@ class OtherFileTests(unittest.TestCase):
...
@@ -230,14 +230,20 @@ class OtherFileTests(unittest.TestCase):
else
:
else
:
f
.
close
()
f
.
close
()
def
testStdin
(
self
):
def
testStdinSeek
(
self
):
# This causes the interpreter to exit on OSF1 v5.1.
if
sys
.
platform
==
'osf1V5'
:
if
sys
.
platform
!=
'osf1V5'
:
# This causes the interpreter to exit on OSF1 v5.1.
self
.
assertRaises
(
IOError
,
sys
.
stdin
.
seek
,
-
1
)
self
.
skipTest
(
'Skipping sys.stdin.seek(-1), it may crash '
else
:
'the interpreter. Test manually.'
)
print
>>
sys
.
__stdout__
,
(
' Skipping sys.stdin.seek(-1), it may crash the interpreter.'
if
not
sys
.
stdin
.
isatty
():
' Test manually.'
)
# Issue #23168: if stdin is redirected to a file, stdin becomes
# seekable
self
.
skipTest
(
'stdin must be a TTY in this test'
)
self
.
assertRaises
(
IOError
,
sys
.
stdin
.
seek
,
-
1
)
def
testStdinTruncate
(
self
):
self
.
assertRaises
(
IOError
,
sys
.
stdin
.
truncate
)
self
.
assertRaises
(
IOError
,
sys
.
stdin
.
truncate
)
def
testUnicodeOpen
(
self
):
def
testUnicodeOpen
(
self
):
...
...
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