Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d359013e
Commit
d359013e
authored
Sep 25, 2014
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio.test_tasks: Fix test_env_var_debug to use correct asyncio module
parent
148405a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
Lib/test/test_asyncio/test_tasks.py
Lib/test/test_asyncio/test_tasks.py
+11
-4
No files found.
Lib/test/test_asyncio/test_tasks.py
View file @
d359013e
"""Tests for tasks.py."""
"""Tests for tasks.py."""
import
os
import
re
import
re
import
sys
import
sys
import
types
import
types
...
@@ -1768,25 +1769,31 @@ class GatherTestsBase:
...
@@ -1768,25 +1769,31 @@ class GatherTestsBase:
self
.
assertEqual
(
fut
.
result
(),
[
3
,
1
,
exc
,
exc2
])
self
.
assertEqual
(
fut
.
result
(),
[
3
,
1
,
exc
,
exc2
])
def
test_env_var_debug
(
self
):
def
test_env_var_debug
(
self
):
aio_path
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
asyncio
.
__file__
))
code
=
'
\
n
'
.
join
((
code
=
'
\
n
'
.
join
((
'import asyncio.coroutines'
,
'import asyncio.coroutines'
,
'print(asyncio.coroutines._DEBUG)'
))
'print(asyncio.coroutines._DEBUG)'
))
# Test with -E to not fail if the unit test was run with
# Test with -E to not fail if the unit test was run with
# PYTHONASYNCIODEBUG set to a non-empty string
# PYTHONASYNCIODEBUG set to a non-empty string
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-E'
,
'-c'
,
code
)
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-E'
,
'-c'
,
code
,
PYTHONPATH
=
aio_path
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'False'
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'False'
)
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-c'
,
code
,
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-c'
,
code
,
PYTHONASYNCIODEBUG
=
''
)
PYTHONASYNCIODEBUG
=
''
,
PYTHONPATH
=
aio_path
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'False'
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'False'
)
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-c'
,
code
,
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-c'
,
code
,
PYTHONASYNCIODEBUG
=
'1'
)
PYTHONASYNCIODEBUG
=
'1'
,
PYTHONPATH
=
aio_path
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'True'
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'True'
)
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-E'
,
'-c'
,
code
,
sts
,
stdout
,
stderr
=
assert_python_ok
(
'-E'
,
'-c'
,
code
,
PYTHONASYNCIODEBUG
=
'1'
)
PYTHONASYNCIODEBUG
=
'1'
,
PYTHONPATH
=
aio_path
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'False'
)
self
.
assertEqual
(
stdout
.
rstrip
(),
b'False'
)
...
...
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