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
a4fbd046
Commit
a4fbd046
authored
Mar 27, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempt to fix test__backdoor.py
parent
dde9546b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
src/greentest/greentest/__init__.py
src/greentest/greentest/__init__.py
+1
-1
src/greentest/greentest/skipping.py
src/greentest/greentest/skipping.py
+5
-0
src/greentest/greentest/sysinfo.py
src/greentest/greentest/sysinfo.py
+2
-0
src/greentest/test__backdoor.py
src/greentest/test__backdoor.py
+7
-5
No files found.
src/greentest/greentest/__init__.py
View file @
a4fbd046
...
...
@@ -77,7 +77,7 @@ from greentest.skipping import skipOnLibuvOnCIOnPyPy
from
greentest.skipping
import
skipOnLibuvOnPyPyOnWin
from
greentest.skipping
import
skipOnPurePython
from
greentest.skipping
import
skipWithCExtensions
from
greentest.skipping
import
skipOnLibuvOnTravisOnCPython27
from
greentest.exception
import
ExpectedException
...
...
src/greentest/greentest/skipping.py
View file @
a4fbd046
...
...
@@ -49,6 +49,7 @@ skipOnLibuvOnWin = _do_not_skip
skipOnLibuvOnCI
=
_do_not_skip
skipOnLibuvOnCIOnPyPy
=
_do_not_skip
skipOnLibuvOnPyPyOnWin
=
_do_not_skip
skipOnLibuvOnTravisOnCPython27
=
_do_not_skip
skipOnLibev
=
_do_not_skip
...
...
@@ -99,6 +100,10 @@ if sysinfo.LIBUV:
skipOnLibuvOnCI
=
unittest
.
skip
if
sysinfo
.
PYPY
:
skipOnLibuvOnCIOnPyPy
=
unittest
.
skip
if
sysinfo
.
RUNNING_ON_TRAVIS
:
if
sysinfo
.
CPYTHON
:
if
sysinfo
.
PY27_ONLY
:
skipOnLibuvOnTravisOnCPython27
=
unittest
.
skip
if
sysinfo
.
WIN
:
skipOnLibuvOnWin
=
unittest
.
skip
...
...
src/greentest/greentest/sysinfo.py
View file @
a4fbd046
...
...
@@ -87,6 +87,8 @@ elif sys.version_info[0] == 2:
PYPY3
=
PYPY
and
PY3
PY27_ONLY
=
sys
.
version_info
[
0
]
==
2
and
sys
.
version_info
[
1
]
==
7
PYGTE279
=
(
sys
.
version_info
[
0
]
==
2
and
sys
.
version_info
[
1
]
>=
7
...
...
src/greentest/test__backdoor.py
View file @
a4fbd046
...
...
@@ -6,8 +6,8 @@ from gevent import backdoor
def
read_until
(
conn
,
postfix
):
read
=
b''
if
not
isinstance
(
postfix
,
bytes
):
postfix
=
postfix
.
encode
(
'utf-8'
)
assert
isinstance
(
postfix
,
bytes
)
while
not
read
.
endswith
(
postfix
):
result
=
conn
.
recv
(
1
)
if
not
result
:
...
...
@@ -53,7 +53,9 @@ class Test(greentest.TestCase):
conn
.
close
()
self
.
close_on_teardown
.
remove
(
conn
)
@
greentest
.
skipOnAppVeyor
(
"Times out"
)
@
greentest
.
skipOnLibuvOnTravisOnCPython27
(
"segfaults; "
"See https://github.com/gevent/gevent/pull/1156"
)
def
test_multi
(
self
):
self
.
_make_server
()
...
...
@@ -100,7 +102,7 @@ class Test(greentest.TestCase):
conn
=
self
.
_create_connection
()
read_until
(
conn
,
b'>>> '
)
conn
.
sendall
(
b'locals()["__builtins__"]
\
r
\
n
'
)
response
=
read_until
(
conn
,
'>>> '
)
response
=
read_until
(
conn
,
b
'>>> '
)
self
.
assertTrue
(
len
(
response
)
<
300
,
msg
=
"locals() unusable: %s..."
%
response
)
self
.
_close
(
conn
)
...
...
@@ -123,7 +125,7 @@ class Test(greentest.TestCase):
conn
=
self
.
_create_connection
()
read_until
(
conn
,
b'>>> '
)
conn
.
sendall
(
b'bad()
\
r
\
n
'
)
response
=
read_until
(
conn
,
'>>> '
)
response
=
read_until
(
conn
,
b
'>>> '
)
response
=
response
.
replace
(
'
\
r
\
n
'
,
'
\
n
'
)
self
.
assertEqual
(
'switching out, then throwing in
\
n
Got Empty
\
n
switching out
\
n
switched in
\
n
>>> '
,
response
)
...
...
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