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
9001d1f4
Commit
9001d1f4
authored
Nov 18, 2017
by
xdegaye
Committed by
GitHub
Nov 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-29184: Skip test_socketserver tests on PermissionError raised by Android (GH-4387)
parent
51d546ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
Lib/test/test_socketserver.py
Lib/test/test_socketserver.py
+14
-5
No files found.
Lib/test/test_socketserver.py
View file @
9001d1f4
...
@@ -60,10 +60,14 @@ def simple_subprocess(testcase):
...
@@ -60,10 +60,14 @@ def simple_subprocess(testcase):
if
pid
==
0
:
if
pid
==
0
:
# Don't raise an exception; it would be caught by the test harness.
# Don't raise an exception; it would be caught by the test harness.
os
.
_exit
(
72
)
os
.
_exit
(
72
)
yield
None
try
:
pid2
,
status
=
os
.
waitpid
(
pid
,
0
)
yield
None
testcase
.
assertEqual
(
pid2
,
pid
)
except
:
testcase
.
assertEqual
(
72
<<
8
,
status
)
raise
finally
:
pid2
,
status
=
os
.
waitpid
(
pid
,
0
)
testcase
.
assertEqual
(
pid2
,
pid
)
testcase
.
assertEqual
(
72
<<
8
,
status
)
class
SocketServerTest
(
unittest
.
TestCase
):
class
SocketServerTest
(
unittest
.
TestCase
):
...
@@ -108,7 +112,12 @@ class SocketServerTest(unittest.TestCase):
...
@@ -108,7 +112,12 @@ class SocketServerTest(unittest.TestCase):
self
.
wfile
.
write
(
line
)
self
.
wfile
.
write
(
line
)
if
verbose
:
print
(
"creating server"
)
if
verbose
:
print
(
"creating server"
)
server
=
MyServer
(
addr
,
MyHandler
)
try
:
server
=
MyServer
(
addr
,
MyHandler
)
except
PermissionError
as
e
:
# Issue 29184: cannot bind() a Unix socket on Android.
self
.
skipTest
(
'Cannot create server (%s, %s): %s'
%
(
svrcls
,
addr
,
e
))
self
.
assertEqual
(
server
.
server_address
,
server
.
socket
.
getsockname
())
self
.
assertEqual
(
server
.
server_address
,
server
.
socket
.
getsockname
())
return
server
return
server
...
...
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