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
6cc31547
Commit
6cc31547
authored
Oct 27, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak timeout for PyPy3 that fails on travis sometimes.
parent
8b40093a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
src/greentest/greentest.py
src/greentest/greentest.py
+5
-1
src/greentest/test_hub_join_timeout.py
src/greentest/test_hub_join_timeout.py
+4
-5
No files found.
src/greentest/greentest.py
View file @
6cc31547
...
...
@@ -84,6 +84,8 @@ elif sys.version_info[0] == 2:
# Python 2, < 2.7.9
NON_APPLICABLE_SUFFIXES
.
append
(
'279'
)
PYPY3
=
PYPY
and
PY3
if
sys
.
platform
.
startswith
(
'win'
):
NON_APPLICABLE_SUFFIXES
.
append
(
"posix"
)
# This is intimately tied to FileObjectPosix
...
...
@@ -113,7 +115,7 @@ else:
return
f
return
dec
if
PYPY
and
PY
3
and
RUNNING_ON_CI
:
if
PYPY3
and
RUNNING_ON_CI
:
# Same as above, for PyPy3.3-5.5-alpha
skipOnPyPy3OnCI
=
unittest
.
skip
else
:
...
...
@@ -122,6 +124,8 @@ else:
return
f
return
dec
EXPECT_POOR_TIMER_RESOLUTION
=
PYPY3
or
RUNNING_ON_APPVEYOR
class
ExpectedException
(
Exception
):
"""An exception whose traceback should be ignored"""
...
...
src/greentest/test_hub_join_timeout.py
View file @
6cc31547
...
...
@@ -11,14 +11,13 @@ FUZZY = SMALL / 2
# setting up signal does not affect join()
gevent
.
signal
(
1
,
lambda
:
None
)
# wouldn't work on windows
from
greentest
import
RUNNING_ON_APPVEYOR
from
greentest
import
EXPECT_POOR_TIMER_RESOLUTION
@
contextmanager
def
expected_time
(
expected
,
fuzzy
=
None
):
if
fuzzy
is
None
:
if
RUNNING_ON_APPVEYOR
:
# The noted timer jitter issues on appveyor
if
EXPECT_POOR_TIMER_RESOLUTION
:
# The noted timer jitter issues on appveyor
/pypy3
fuzzy
=
expected
*
5.0
else
:
fuzzy
=
expected
/
2.0
...
...
@@ -28,7 +27,7 @@ def expected_time(expected, fuzzy=None):
assert
expected
-
fuzzy
<=
elapsed
<=
expected
+
fuzzy
,
'Expected: %r; elapsed: %r; fuzzy %r'
%
(
expected
,
elapsed
,
fuzzy
)
def
no_time
(
fuzzy
=
(
0.001
if
not
RUNNING_ON_APPVEYOR
else
1.0
)):
def
no_time
(
fuzzy
=
(
0.001
if
not
EXPECT_POOR_TIMER_RESOLUTION
else
1.0
)):
return
expected_time
(
0
,
fuzzy
=
fuzzy
)
...
...
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