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 @@
...
@@ -20,9 +20,11 @@
from
functools
import
wraps
from
functools
import
wraps
def
wrap_error_fatal
(
method
):
def
wrap_error_fatal
(
method
):
import
gevent
import
gevent
SYSTEM_ERROR
=
gevent
.
get_hub
().
SYSTEM_ERROR
system_error
=
gevent
.
get_hub
().
SYSTEM_ERROR
@
wraps
(
method
)
@
wraps
(
method
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
def
wrapper
(
self
,
*
args
,
**
kwargs
):
# XXX should also be able to do gevent.SYSTEM_ERROR = object
# XXX should also be able to do gevent.SYSTEM_ERROR = object
...
@@ -32,13 +34,14 @@ def wrap_error_fatal(method):
...
@@ -32,13 +34,14 @@ def wrap_error_fatal(method):
try
:
try
:
return
method
(
self
,
*
args
,
**
kwargs
)
return
method
(
self
,
*
args
,
**
kwargs
)
finally
:
finally
:
gevent
.
get_hub
().
SYSTEM_ERROR
=
SYSTEM_ERROR
gevent
.
get_hub
().
SYSTEM_ERROR
=
system_error
return
wrapper
return
wrapper
def
wrap_restore_handle_error
(
method
):
def
wrap_restore_handle_error
(
method
):
import
gevent
import
gevent
old
=
gevent
.
get_hub
().
handle_error
old
=
gevent
.
get_hub
().
handle_error
@
wraps
(
method
)
@
wraps
(
method
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
def
wrapper
(
self
,
*
args
,
**
kwargs
):
try
:
try
:
...
...
src/greentest/greentest/leakcheck.py
View file @
bc7a7deb
...
@@ -18,9 +18,11 @@
...
@@ -18,9 +18,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# THE SOFTWARE.
import
sys
import
gc
import
gc
import
collections
import
collections
import
types
import
types
from
functools
import
wraps
import
gevent.core
import
gevent.core
...
@@ -68,7 +70,7 @@ def wrap_refcount(method):
...
@@ -68,7 +70,7 @@ def wrap_refcount(method):
return
diff
return
diff
@
wraps
(
method
)
@
wraps
(
method
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
def
wrapper
(
self
,
*
args
,
**
kwargs
):
# pylint:disable=too-many-branches
gc
.
collect
()
gc
.
collect
()
gc
.
collect
()
gc
.
collect
()
gc
.
collect
()
gc
.
collect
()
...
...
src/greentest/greentest/six.py
View file @
bc7a7deb
import
sys
import
sys
# pylint:disable=unused-argument,import-error
PY3
=
sys
.
version_info
[
0
]
>=
3
PY3
=
sys
.
version_info
[
0
]
>=
3
...
@@ -18,7 +19,7 @@ if PY3:
...
@@ -18,7 +19,7 @@ if PY3:
raise
value
raise
value
xrange
=
range
xrange
=
range
string_types
=
str
,
string_types
=
(
str
,)
text_type
=
str
text_type
=
str
else
:
else
:
...
@@ -36,7 +37,7 @@ else:
...
@@ -36,7 +37,7 @@ else:
import
__builtin__
as
builtins
import
__builtin__
as
builtins
xrange
=
builtins
.
xrange
xrange
=
builtins
.
xrange
string_types
=
builtins
.
basestring
,
string_types
=
(
builtins
.
basestring
,)
text_type
=
builtins
.
unicode
text_type
=
builtins
.
unicode
exec_
(
"""def reraise(tp, value, tb=None):
exec_
(
"""def reraise(tp, value, tb=None):
...
...
src/greentest/greentest/skipping.py
View file @
bc7a7deb
...
@@ -23,12 +23,15 @@ import unittest
...
@@ -23,12 +23,15 @@ import unittest
from
greentest
import
sysinfo
from
greentest
import
sysinfo
def
_do_not_skip
(
reason
):
def
_do_not_skip
(
reason
):
assert
reason
assert
reason
def
dec
(
f
):
def
dec
(
f
):
return
f
return
f
return
dec
return
dec
if
sysinfo
.
WIN
:
if
sysinfo
.
WIN
:
skipOnWindows
=
unittest
.
skip
skipOnWindows
=
unittest
.
skip
else
:
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