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
de814b51
Commit
de814b51
authored
Nov 22, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hopefully fix test_is_socket_true
parent
7039a242
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
Lib/test/test_pathlib.py
Lib/test/test_pathlib.py
+6
-2
No files found.
Lib/test/test_pathlib.py
View file @
de814b51
...
...
@@ -1499,9 +1499,13 @@ class _BasePathTest(object):
@
unittest
.
skipUnless
(
hasattr
(
socket
,
"AF_UNIX"
),
"Unix sockets required"
)
def
test_is_socket_true
(
self
):
P
=
self
.
cls
(
BASE
,
'mysock'
)
sock
=
socket
.
socket
(
socket
.
SOCK_STREAM
,
socket
.
AF_UNIX
)
sock
=
socket
.
socket
(
socket
.
AF_UNIX
,
socket
.
SOCK_STREAM
)
self
.
addCleanup
(
sock
.
close
)
sock
.
bind
(
str
(
P
))
try
:
sock
.
bind
(
str
(
P
))
except
OSError
as
e
:
if
"AF_UNIX path too long"
in
str
(
e
):
self
.
skipTest
(
"cannot bind Unix socket: "
+
str
(
e
))
self
.
assertTrue
(
P
.
is_socket
())
self
.
assertFalse
(
P
.
is_fifo
())
self
.
assertFalse
(
P
.
is_file
())
...
...
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