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
bc7a7deb
Commit
bc7a7deb
authored
Jan 17, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pylint
parent
21837b80
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
src/greentest/greentest/errorhandler.py
src/greentest/greentest/errorhandler.py
+5
-2
src/greentest/greentest/leakcheck.py
src/greentest/greentest/leakcheck.py
+3
-1
src/greentest/greentest/six.py
src/greentest/greentest/six.py
+3
-2
src/greentest/greentest/skipping.py
src/greentest/greentest/skipping.py
+3
-0
No files found.
src/greentest/greentest/errorhandler.py
View file @
bc7a7deb
...
...
@@ -20,9 +20,11 @@
from
functools
import
wraps
def
wrap_error_fatal
(
method
):
import
gevent
SYSTEM_ERROR
=
gevent
.
get_hub
().
SYSTEM_ERROR
system_error
=
gevent
.
get_hub
().
SYSTEM_ERROR
@
wraps
(
method
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
# XXX should also be able to do gevent.SYSTEM_ERROR = object
...
...
@@ -32,13 +34,14 @@ def wrap_error_fatal(method):
try
:
return
method
(
self
,
*
args
,
**
kwargs
)
finally
:
gevent
.
get_hub
().
SYSTEM_ERROR
=
SYSTEM_ERROR
gevent
.
get_hub
().
SYSTEM_ERROR
=
system_error
return
wrapper
def
wrap_restore_handle_error
(
method
):
import
gevent
old
=
gevent
.
get_hub
().
handle_error
@
wraps
(
method
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
try
:
...
...
src/greentest/greentest/leakcheck.py
View file @
bc7a7deb
...
...
@@ -18,9 +18,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import
sys
import
gc
import
collections
import
types
from
functools
import
wraps
import
gevent.core
...
...
@@ -68,7 +70,7 @@ def wrap_refcount(method):
return
diff
@
wraps
(
method
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
def
wrapper
(
self
,
*
args
,
**
kwargs
):
# pylint:disable=too-many-branches
gc
.
collect
()
gc
.
collect
()
gc
.
collect
()
...
...
src/greentest/greentest/six.py
View file @
bc7a7deb
import
sys
# pylint:disable=unused-argument,import-error
PY3
=
sys
.
version_info
[
0
]
>=
3
...
...
@@ -18,7 +19,7 @@ if PY3:
raise
value
xrange
=
range
string_types
=
str
,
string_types
=
(
str
,)
text_type
=
str
else
:
...
...
@@ -36,7 +37,7 @@ else:
import
__builtin__
as
builtins
xrange
=
builtins
.
xrange
string_types
=
builtins
.
basestring
,
string_types
=
(
builtins
.
basestring
,)
text_type
=
builtins
.
unicode
exec_
(
"""def reraise(tp, value, tb=None):
...
...
src/greentest/greentest/skipping.py
View file @
bc7a7deb
...
...
@@ -23,12 +23,15 @@ import unittest
from
greentest
import
sysinfo
def
_do_not_skip
(
reason
):
assert
reason
def
dec
(
f
):
return
f
return
dec
if
sysinfo
.
WIN
:
skipOnWindows
=
unittest
.
skip
else
:
...
...
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