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
c4b3da12
Commit
c4b3da12
authored
Dec 19, 2019
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give up, skip on Py2
parent
3db0c28c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
src/gevent/testing/__init__.py
src/gevent/testing/__init__.py
+1
-0
src/gevent/testing/skipping.py
src/gevent/testing/skipping.py
+1
-0
src/gevent/tests/test__monkey_module_run.py
src/gevent/tests/test__monkey_module_run.py
+18
-6
No files found.
src/gevent/testing/__init__.py
View file @
c4b3da12
...
...
@@ -87,6 +87,7 @@ from .skipping import skipOnLibuvOnTravisOnCPython27
from
.skipping
import
skipOnPy37
from
.skipping
import
skipWithoutResource
from
.skipping
import
skipWithoutExternalNetwork
from
.skipping
import
skipOnPy2
from
.exception
import
ExpectedException
...
...
src/gevent/testing/skipping.py
View file @
c4b3da12
...
...
@@ -42,6 +42,7 @@ skipOnPyPy3OnCI = _do_not_skip
skipOnPyPy3
=
_do_not_skip
skipOnPyPyOnWindows
=
_do_not_skip
skipOnPy2
=
unittest
.
skip
if
sysinfo
.
PY2
else
_do_not_skip
skipOnPy37
=
unittest
.
skip
if
sysinfo
.
PY37
else
_do_not_skip
skipOnPurePython
=
unittest
.
skip
if
sysinfo
.
PURE_PYTHON
else
_do_not_skip
...
...
src/gevent/tests/test__monkey_module_run.py
View file @
c4b3da12
...
...
@@ -13,12 +13,12 @@ import os
import
os.path
import
sys
import
unittest
from
subprocess
import
Popen
from
subprocess
import
PIPE
class
TestRun
(
unittest
.
TestCase
):
from
gevent
import
testing
as
greentest
class
TestRun
(
greentest
.
TestCase
):
maxDiff
=
None
def
setUp
(
self
):
...
...
@@ -46,8 +46,6 @@ class TestRun(unittest.TestCase):
p
=
Popen
(
args
,
stdout
=
PIPE
,
stderr
=
PIPE
)
std_out
,
std_err
=
p
.
communicate
()
if
b'sys.excepthook'
in
std_err
:
self
.
skipTest
(
"Standard library version raised."
)
self
.
assertEqual
(
0
,
p
.
returncode
,
(
p
.
returncode
,
std_out
,
std_err
))
monkey_out_lines
=
monkey_out
.
decode
(
"utf-8"
).
splitlines
()
...
...
@@ -82,6 +80,18 @@ class TestRun(unittest.TestCase):
self
.
assertEqual
(
lines
[
1
],
'monkey_package/issue302monkey.py'
)
self
.
assertEqual
(
lines
[
2
],
'True'
,
lines
)
# These three tests all sometimes fail on Py2 on CI, writing
# to stderr:
# Unhandled exception in thread started by \n
# sys.excepthook is missing\n
# lost sys.stderr\n
# Fatal Python error: PyImport_GetModuleDict: no module dictionary!\n'
# I haven't been able to produce this locally on macOS or Linux.
# The last line seems new with 2.7.17?
# Also, occasionally, they get '3' instead of '2' for the number of threads.
# That could have something to do with...? Most commonly that's PyPy, but
# sometimes CPython. Again, haven't reproduced.
@
greentest
.
skipOnPy2
(
"lost sys.stderr sometimes"
)
def
test_threadpool_in_patched_after_patch
(
self
):
# Issue 1484
# If we don't have this correct, then we get exceptions
...
...
@@ -89,6 +99,7 @@ class TestRun(unittest.TestCase):
self
.
assertEqual
(
out
,
[
'False'
,
'2'
])
self
.
assertEqual
(
err
,
b''
)
@
greentest
.
skipOnPy2
(
"lost sys.stderr sometimes"
)
def
test_threadpool_in_patched_after_patch_module
(
self
):
# Issue 1484
# If we don't have this correct, then we get exceptions
...
...
@@ -96,6 +107,7 @@ class TestRun(unittest.TestCase):
self
.
assertEqual
(
out
,
[
'False'
,
'2'
])
self
.
assertEqual
(
err
,
b''
)
@
greentest
.
skipOnPy2
(
"lost sys.stderr sometimes"
)
def
test_threadpool_not_patched_after_patch_module
(
self
):
# Issue 1484
# If we don't have this correct, then we get exceptions
...
...
@@ -104,4 +116,4 @@ class TestRun(unittest.TestCase):
self
.
assertEqual
(
err
,
b''
)
if
__name__
==
'__main__'
:
unit
test
.
main
()
green
test
.
main
()
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