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
daf20462
Commit
daf20462
authored
Jan 18, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EXPECT_POOR_TIMER_RESOLUTION should cover this case too.
parent
afe5d1ec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
src/greentest/greentest/sysinfo.py
src/greentest/greentest/sysinfo.py
+4
-1
src/greentest/greentest/testcase.py
src/greentest/greentest/testcase.py
+4
-4
src/greentest/greentest/timing.py
src/greentest/greentest/timing.py
+3
-2
No files found.
src/greentest/greentest/sysinfo.py
View file @
daf20462
...
...
@@ -107,7 +107,10 @@ if RUNNING_ON_APPVEYOR:
# 'develop' mode (i.e., we install)
NON_APPLICABLE_SUFFIXES
.
append
(
'corecext'
)
EXPECT_POOR_TIMER_RESOLUTION
=
PYPY3
or
RUNNING_ON_APPVEYOR
or
(
LIBUV
and
PYPY
)
EXPECT_POOR_TIMER_RESOLUTION
=
(
PYPY3
or
RUNNING_ON_APPVEYOR
or
(
LIBUV
and
PYPY
)
or
(
CFFI_BACKEND
and
RUN_COVERAGE
))
CONN_ABORTED_ERRORS
=
[]
...
...
src/greentest/greentest/testcase.py
View file @
daf20462
...
...
@@ -225,7 +225,7 @@ class TestCase(TestCaseMetaClass("NewBase", (BaseTestCase,), {})):
self
.
assertIsInstance
(
econtext
,
where_type
)
return
error
if
sysinfo
.
RUNNING_ON_APPVEYOR
:
if
sysinfo
.
EXPECT_POOR_TIMER_RESOLUTION
:
# pylint:disable=unused-argument
# appveyor timeouts are unreliable; seems to be very slow wakeups
def
assertTimeoutAlmostEqual
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -237,9 +237,9 @@ class TestCase(TestCaseMetaClass("NewBase", (BaseTestCase,), {})):
def
assertTimeoutAlmostEqual
(
self
,
*
args
,
**
kwargs
):
self
.
assertAlmostEqual
(
*
args
,
**
kwargs
)
def
assertTimeWithinRange
(
self
,
delay
,
min_time
,
max_time
):
self
.
assertLessEqual
(
delay
,
max_time
)
self
.
assertGreaterEqual
(
delay
,
min_time
)
def
assertTimeWithinRange
(
self
,
time_taken
,
min_time
,
max_time
):
self
.
assertLessEqual
(
time_taken
,
max_time
)
self
.
assertGreaterEqual
(
time_taken
,
min_time
)
def
assertMonkeyPatchedFuncSignatures
(
self
,
mod_name
,
func_names
=
(),
exclude
=
()):
...
...
src/greentest/greentest/timing.py
View file @
daf20462
...
...
@@ -46,8 +46,9 @@ class _DelayWaitMixin(object):
delay_max_adj
=
None
):
delay_min_adj
=
self
.
_default_delay_min_adj
if
not
delay_min_adj
else
delay_min_adj
delay_max_adj
=
self
.
_default_delay_max_adj
if
not
delay_max_adj
else
delay_max_adj
self
.
assertGreaterEqual
(
delay
,
timeout
-
delay_min_adj
)
self
.
assertLess
(
delay
,
timeout
+
delay_max_adj
)
self
.
assertTimeWithinRange
(
delay
,
timeout
-
delay_min_adj
,
timeout
+
delay_max_adj
)
def
_wait_and_check
(
self
,
timeout
=
None
):
if
timeout
is
None
:
...
...
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