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
c337edea
Commit
c337edea
authored
Apr 27, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak a timer value, seen a failure in libev-cffi on travis.
parent
4749d429
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
src/greentest/greentest/testrunner.py
src/greentest/greentest/testrunner.py
+15
-14
src/greentest/test__core_timer.py
src/greentest/test__core_timer.py
+4
-1
No files found.
src/greentest/greentest/testrunner.py
View file @
c337edea
...
@@ -332,33 +332,33 @@ def print_list(lst):
...
@@ -332,33 +332,33 @@ def print_list(lst):
for
name
in
lst
:
for
name
in
lst
:
log
(
' - %s'
,
name
)
log
(
' - %s'
,
name
)
def
_setup_environ
():
def
_setup_environ
(
debug
=
False
):
if
'PYTHONWARNINGS'
not
in
os
.
environ
and
not
sys
.
warnoptions
:
if
'PYTHONWARNINGS'
not
in
os
.
environ
and
not
sys
.
warnoptions
:
# Enable default warnings such as ResourceWarning.
# On Python 3[.6], the system site.py module has
# "open(fullname, 'rU')" which produces the warning that
# 'U' is deprecated, so ignore warnings from site.py
# importlib/_bootstrap.py likes to spit out "ImportWarning:
# can't resolve package from __spec__ or __package__, falling
# back on __name__ and __path__". I have no idea what that means, but it seems harmless
# and is annoying.
# pkgutil on Python 2 complains about missing __init__.py
# action:message:category:module:line
# action:message:category:module:line
os
.
environ
[
'PYTHONWARNINGS'
]
=
','
.
join
([
os
.
environ
[
'PYTHONWARNINGS'
]
=
','
.
join
([
# Enable default warnings such as ResourceWarning.
'default'
,
'default'
,
# On Python 3[.6], the system site.py module has
# "open(fullname, 'rU')" which produces the warning that
# 'U' is deprecated, so ignore warnings from site.py
'ignore:::site:'
,
'ignore:::site:'
,
# pkgutil on Python 2 complains about missing __init__.py
'ignore:::pkgutil'
,
'ignore:::pkgutil'
,
# importlib/_bootstrap.py likes to spit out "ImportWarning:
# can't resolve package from __spec__ or __package__, falling
# back on __name__ and __path__". I have no idea what that means, but it seems harmless
# and is annoying.
'ignore:::importlib._bootstrap:'
,
'ignore:::importlib._bootstrap:'
,
'ignore:::importlib._bootstrap_external:'
,
'ignore:::importlib._bootstrap_external:'
,
# importing ABCs from collections, not collections.abc
'ignore:::pkg_resources._vendor.pyparsing:'
,
])
])
if
'PYTHONFAULTHANDLER'
not
in
os
.
environ
:
if
'PYTHONFAULTHANDLER'
not
in
os
.
environ
:
os
.
environ
[
'PYTHONFAULTHANDLER'
]
=
'true'
os
.
environ
[
'PYTHONFAULTHANDLER'
]
=
'true'
if
'GEVENT_DEBUG'
not
in
os
.
environ
:
if
'GEVENT_DEBUG'
not
in
os
.
environ
and
debug
:
os
.
environ
[
'GEVENT_DEBUG'
]
=
'debug'
os
.
environ
[
'GEVENT_DEBUG'
]
=
'debug'
if
'PYTHONTRACEMALLOC'
not
in
os
.
environ
:
if
'PYTHONTRACEMALLOC'
not
in
os
.
environ
:
...
@@ -390,6 +390,7 @@ def main():
...
@@ -390,6 +390,7 @@ def main():
parser
.
add_argument
(
"--coverage"
,
action
=
"store_true"
)
parser
.
add_argument
(
"--coverage"
,
action
=
"store_true"
)
parser
.
add_argument
(
"--quiet"
,
action
=
"store_true"
,
default
=
True
)
parser
.
add_argument
(
"--quiet"
,
action
=
"store_true"
,
default
=
True
)
parser
.
add_argument
(
"--verbose"
,
action
=
"store_false"
,
dest
=
'quiet'
)
parser
.
add_argument
(
"--verbose"
,
action
=
"store_false"
,
dest
=
'quiet'
)
parser
.
add_argument
(
"--debug"
,
action
=
"store_true"
,
default
=
False
)
parser
.
add_argument
(
'tests'
,
nargs
=
'*'
)
parser
.
add_argument
(
'tests'
,
nargs
=
'*'
)
options
=
parser
.
parse_args
()
options
=
parser
.
parse_args
()
FAILING_TESTS
=
[]
FAILING_TESTS
=
[]
...
@@ -408,7 +409,7 @@ def main():
...
@@ -408,7 +409,7 @@ def main():
os
.
environ
[
'COVERAGE_FILE'
]
=
os
.
path
.
abspath
(
"."
)
+
os
.
sep
+
".coverage"
os
.
environ
[
'COVERAGE_FILE'
]
=
os
.
path
.
abspath
(
"."
)
+
os
.
sep
+
".coverage"
print
(
"Enabling coverage to"
,
os
.
environ
[
'COVERAGE_FILE'
])
print
(
"Enabling coverage to"
,
os
.
environ
[
'COVERAGE_FILE'
])
_setup_environ
()
_setup_environ
(
debug
=
options
.
debug
)
if
options
.
config
:
if
options
.
config
:
config
=
{}
config
=
{}
...
...
src/greentest/test__core_timer.py
View file @
c337edea
...
@@ -112,6 +112,9 @@ class TestTimerResolution(Test):
...
@@ -112,6 +112,9 @@ class TestTimerResolution(Test):
loop
=
self
.
loop
loop
=
self
.
loop
timer_multiplier
=
11
max_time
=
self
.
timer_duration
*
timer_multiplier
assert
max_time
<
0.3
for
_
in
range
(
150
):
for
_
in
range
(
150
):
# in libuv, our signal timer fires every 300ms; depending on
# in libuv, our signal timer fires every 300ms; depending on
...
@@ -138,7 +141,7 @@ class TestTimerResolution(Test):
...
@@ -138,7 +141,7 @@ class TestTimerResolution(Test):
self
.
assertEqual
(
1
,
len
(
fired_at
))
self
.
assertEqual
(
1
,
len
(
fired_at
))
self
.
assertTimeWithinRange
(
fired_at
[
0
]
-
now
,
self
.
assertTimeWithinRange
(
fired_at
[
0
]
-
now
,
0
,
0
,
self
.
timer_duration
*
5
)
max_time
)
if
not
greentest
.
RUNNING_ON_CI
:
if
not
greentest
.
RUNNING_ON_CI
:
...
...
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