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
0e515474
Commit
0e515474
authored
Dec 11, 2017
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another whack-a-mole for Travis; avoid keeping the sockets at all under PyPy
parent
d86b1736
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
19 deletions
+33
-19
src/greentest/known_failures.py
src/greentest/known_failures.py
+4
-0
src/greentest/patched_tests_setup.py
src/greentest/patched_tests_setup.py
+1
-1
src/greentest/test__makefile_ref.py
src/greentest/test__makefile_ref.py
+28
-18
No files found.
src/greentest/known_failures.py
View file @
0e515474
...
...
@@ -152,6 +152,10 @@ if PYPY:
## Unknown; can't reproduce locally on OS X
'FLAKY test_subprocess.py'
,
# timeouts on one test.
## PyPy3 5.9.0-beta seems to have dropped recvmsg_into?
'test_socket.py'
,
'FLAKY test_ssl.py'
,
]
...
...
src/greentest/patched_tests_setup.py
View file @
0e515474
...
...
@@ -549,7 +549,7 @@ if hasattr(sys, 'pypy_version_info') and sys.version_info[:2] >= (3, 3):
if
hasattr
(
sys
,
'pypy_version_info'
)
and
sys
.
pypy_version_info
[:
4
]
in
(
# pylint:disable=no-member
(
5
,
8
,
0
,
'beta'
),
(
5
,
8
,
0
,
'beta'
),
(
5
,
9
,
0
,
'beta'
),
):
# 3.5 is beta. Hard to say what are real bugs in us vs real bugs in pypy.
# For that reason, we pin these patches exactly to the version in use.
...
...
src/greentest/test__makefile_ref.py
View file @
0e515474
...
...
@@ -8,19 +8,20 @@ import unittest
import
errno
import
weakref
from
greentest
import
TestCase
import
greentest
dirname
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
certfile
=
os
.
path
.
join
(
dirname
,
'2.7/keycert.pem'
)
pid
=
os
.
getpid
()
import
sys
PY
3
=
sys
.
version_info
[
0
]
>=
3
PY3
=
greentest
.
PY3
PY
PY
=
greentest
.
PYPY
fd_types
=
int
if
PY3
:
long
=
int
fd_types
=
(
int
,
long
)
WIN
=
sys
.
platform
.
startswith
(
"win"
)
WIN
=
greentest
.
WIN
from
greentest
import
get_open_files
try
:
...
...
@@ -29,7 +30,7 @@ except ImportError:
psutil
=
None
class
Test
(
TestCase
):
class
Test
(
greentest
.
TestCase
):
extra_allowed_open_states
=
()
...
...
@@ -113,19 +114,28 @@ class Test(TestCase):
self
.
assert_open
(
s
,
s
.
fileno
())
return
s
def
_close_on_teardown
(
self
,
resource
):
# Keeping raw sockets alive keeps SSL sockets
# from being closed too, at least on CPython, so we
# need to use weakrefs
if
'close_on_teardown'
not
in
self
.
__dict__
:
self
.
close_on_teardown
=
[]
self
.
close_on_teardown
.
append
(
weakref
.
ref
(
resource
))
return
resource
def
_tearDownCloseOnTearDown
(
self
):
self
.
close_on_teardown
=
[
r
()
for
r
in
self
.
close_on_teardown
if
r
()
is
not
None
]
super
(
Test
,
self
).
_tearDownCloseOnTearDown
()
self
.
_tearDownCloseOnTearDown
=
()
if
not
PYPY
or
not
greentest
.
RUNNING_ON_TRAVIS
:
def
_close_on_teardown
(
self
,
resource
):
# Keeping raw sockets alive keeps SSL sockets
# from being closed too, at least on CPython, so we
# need to use weakrefs
if
'close_on_teardown'
not
in
self
.
__dict__
:
self
.
close_on_teardown
=
[]
self
.
close_on_teardown
.
append
(
weakref
.
ref
(
resource
))
return
resource
def
_tearDownCloseOnTearDown
(
self
):
self
.
close_on_teardown
=
[
r
()
for
r
in
self
.
close_on_teardown
if
r
()
is
not
None
]
super
(
Test
,
self
).
_tearDownCloseOnTearDown
()
self
.
_tearDownCloseOnTearDown
=
()
else
:
# Seeing a weird GC? interaction on linux.
# I can't reproduce locally. Define these as no-ops
# there
def
_close_on_teardown
(
self
,
resource
):
return
resource
class
TestSocket
(
Test
):
...
...
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