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
0c1d7fcd
Commit
0c1d7fcd
authored
Jan 05, 2020
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks for PyPy3 on Linux.
parent
d5782662
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
src/gevent/tests/test__makefile_ref.py
src/gevent/tests/test__makefile_ref.py
+15
-14
No files found.
src/gevent/tests/test__makefile_ref.py
View file @
0c1d7fcd
...
...
@@ -54,11 +54,19 @@ class Test(greentest.TestCase):
raise
raise
AssertionError
(
'NOT RAISED EBADF: %r() returned %r'
%
(
func
,
result
))
def
assert_fd_open
(
self
,
fileno
):
assert
isinstance
(
fileno
,
fd_types
)
open_files
=
get_open_files
()
if
fileno
not
in
open_files
:
raise
AssertionError
(
'%r is not open:
\
n
%s'
%
(
fileno
,
open_files
[
'data'
]))
if
WIN
or
(
PYPY
and
PY3
and
greentest
.
LINUX
):
def
__assert_fd_open
(
self
,
fileno
):
# We can't detect open file descriptors on Windows.
# On PyPy 3.6-7.3 on Travis CI (linux), for some reason the
# client file descriptors don't always show as open. Don't know why,
# was fine in 7.2.
pass
else
:
def
__assert_fd_open
(
self
,
fileno
):
assert
isinstance
(
fileno
,
fd_types
)
open_files
=
get_open_files
()
if
fileno
not
in
open_files
:
raise
AssertionError
(
'%r is not open:
\
n
%s'
%
(
fileno
,
open_files
[
'data'
]))
def
assert_fd_closed
(
self
,
fileno
):
assert
isinstance
(
fileno
,
fd_types
),
repr
(
fileno
)
...
...
@@ -79,21 +87,14 @@ class Test(greentest.TestCase):
def
assert_open
(
self
,
sock
,
*
rest
):
if
isinstance
(
sock
,
fd_types
):
if
WIN
or
(
PYPY
and
PY3
and
greentest
.
LINUX
):
# We can't detect open file descriptors on Windows.
# On PyPy 3.6-7.3 on Travis CI (linux), for some reason the
# client file descriptors don't always show as open. Don't know why,
# was fine in 7.2.
pass
else
:
self
.
assert_fd_open
(
sock
)
self
.
__assert_fd_open
(
sock
)
else
:
fileno
=
sock
.
fileno
()
assert
isinstance
(
fileno
,
fd_types
),
fileno
sockname
=
sock
.
getsockname
()
assert
isinstance
(
sockname
,
tuple
),
sockname
if
not
WIN
:
self
.
assert_fd_open
(
fileno
)
self
.
__
assert_fd_open
(
fileno
)
else
:
self
.
_assert_sock_open
(
sock
)
if
rest
:
...
...
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