Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
f318b6d2
Commit
f318b6d2
authored
Jun 23, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing the attributes, need to see what they are under linux.
parent
d07e4bb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
greentest/test__socket.py
greentest/test__socket.py
+14
-0
No files found.
greentest/test__socket.py
View file @
f318b6d2
...
@@ -185,6 +185,20 @@ class TestTCP(greentest.TestCase):
...
@@ -185,6 +185,20 @@ class TestTCP(greentest.TestCase):
fd
.
close
()
fd
.
close
()
acceptor
.
join
()
acceptor
.
join
()
def
test_attributes
(
self
):
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
,
0
)
print
(
"Socket type"
,
s
.
type
)
self
.
assertEqual
(
socket
.
AF_INET
,
s
.
type
)
self
.
assertEqual
(
socket
.
SOCK_DGRAM
,
s
.
family
)
self
.
assertEqual
(
0
,
s
.
proto
)
if
hasattr
(
socket
,
'SOCK_NONBLOCK'
):
print
(
"Has non-block"
)
s
.
settimeout
(
1
)
print
(
"Socket type with timeout"
,
s
.
type
)
self
.
assertEqual
(
socket
.
AF_INET
,
s
.
type
)
def
get_port
():
def
get_port
():
tempsock
=
socket
.
socket
()
tempsock
=
socket
.
socket
()
...
...
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