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
8f8b2139
Commit
8f8b2139
authored
Apr 11, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
greentest/helper.py: allow customizing monkey.patch_all
parent
a130025d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
greentest/helper.py
greentest/helper.py
+7
-4
No files found.
greentest/helper.py
View file @
8f8b2139
...
...
@@ -19,9 +19,11 @@ class ContainsAll(object):
return
True
def
patch_all
(
timeout
=
None
):
def
patch_all
(
**
kwargs
):
timeout
=
kwargs
.
pop
(
'timeout'
,
None
)
kwargs
.
setdefault
(
'aggressive'
,
True
)
from
gevent
import
monkey
monkey
.
patch_all
(
aggressive
=
True
)
monkey
.
patch_all
(
**
kwargs
)
import
unittest
import
greentest
unittest
.
TestCase
=
greentest
.
TestCase0
...
...
@@ -38,8 +40,9 @@ def imp_find_dotted_module(name):
return
result
def
prepare_stdlib_test
(
filename
):
patch_all
(
timeout
=
20
)
def
prepare_stdlib_test
(
filename
,
**
kwargs
):
kwargs
.
setdefault
(
'timeout'
,
20
)
patch_all
(
**
kwargs
)
import
test
try
:
from
test
import
test_support
...
...
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