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
1557a367
Commit
1557a367
authored
Aug 05, 2021
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test__execmodules to supply the right module name.
parent
5112e05f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/gevent/local.py
src/gevent/local.py
+2
-1
src/gevent/tests/test__execmodules.py
src/gevent/tests/test__execmodules.py
+1
-2
No files found.
src/gevent/local.py
View file @
1557a367
...
...
@@ -615,7 +615,8 @@ if local.__module__ == 'gevent.local':
else
:
# pragma: no cover
# Make sure we revisit in case of changes to the (accelerator) module names.
if
local
.
__module__
!=
'gevent._gevent_clocal'
:
raise
AssertionError
(
"Module names changed; revisit this code."
)
raise
AssertionError
(
"Module names changed (local: %r; __name__: %r); revisit this code"
%
(
local
.
__module__
,
__name__
)
)
_init
()
...
...
src/gevent/tests/test__execmodules.py
View file @
1557a367
...
...
@@ -8,14 +8,13 @@ from gevent.testing import six
def
make_exec_test
(
path
,
module
):
def
test
(
_
):
with
open
(
path
,
'rb'
)
as
f
:
src
=
f
.
read
()
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
'ignore'
,
DeprecationWarning
)
try
:
six
.
exec_
(
src
,
{
'__file__'
:
path
})
six
.
exec_
(
src
,
{
'__file__'
:
path
,
'__name__'
:
module
})
except
ImportError
:
if
module
in
modules
.
OPTIONAL_MODULES
:
raise
unittest
.
SkipTest
(
"Unable to import optional module %s"
%
module
)
...
...
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