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
3b630a0a
Commit
3b630a0a
authored
Apr 09, 2019
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests work without the backport of mock.
parent
3a4c73b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/gevent/testing/__init__.py
src/gevent/testing/__init__.py
+12
-1
src/gevent/testing/leakcheck.py
src/gevent/testing/leakcheck.py
+1
-1
No files found.
src/gevent/testing/__init__.py
View file @
3b630a0a
...
@@ -128,9 +128,20 @@ def gc_collect_if_needed():
...
@@ -128,9 +128,20 @@ def gc_collect_if_needed():
if
PYPY
:
# pragma: no cover
if
PYPY
:
# pragma: no cover
gc
.
collect
()
gc
.
collect
()
# Our usage of mock should be limited to '@mock.patch()'
# and other things that are easily...mocked...here on Python 2
# when mock is not installed.
try
:
try
:
from
unittest
import
mock
from
unittest
import
mock
except
ImportError
:
# Python 2
except
ImportError
:
# Python 2
import
mock
try
:
import
mock
except
ImportError
:
# pragma: no cover
# Backport not installed
class
mock
(
object
):
@
staticmethod
def
patch
(
reason
):
return
unittest
.
skip
(
reason
)
mock
=
mock
mock
=
mock
src/gevent/testing/leakcheck.py
View file @
3b630a0a
...
@@ -27,7 +27,7 @@ import unittest
...
@@ -27,7 +27,7 @@ import unittest
try
:
try
:
import
objgraph
import
objgraph
except
ImportError
:
except
ImportError
:
# pragma: no cover
# Optional test dependency
# Optional test dependency
objgraph
=
None
objgraph
=
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