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
634a8fc0
Commit
634a8fc0
authored
Oct 02, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix issue #19134 again
parent
45163ccc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Lib/test/test_inspect.py
Lib/test/test_inspect.py
+6
-5
No files found.
Lib/test/test_inspect.py
View file @
634a8fc0
...
...
@@ -11,9 +11,12 @@ import shutil
import
functools
import
importlib
from
os.path
import
normcase
try
:
from
concurrent.futures
import
ThreadPoolExecutor
except
ImportError
:
ThreadPoolExecutor
=
None
from
test.support
import
run_unittest
,
TESTFN
,
DirsOnSysPath
from
test.support
import
multiprocessing
as
has_multiprocessing
from
test.script_helper
import
assert_python_ok
,
assert_python_failure
from
test
import
inspect_fodder
as
mod
from
test
import
inspect_fodder2
as
mod2
...
...
@@ -2408,17 +2411,15 @@ class TestMain(unittest.TestCase):
self
.
assertEqual
(
lines
[:
-
1
],
inspect
.
getsource
(
module
).
splitlines
())
self
.
assertEqual
(
err
,
b''
)
@
unittest
.
skipIf
(
not
has_multiprocessing
,
@
unittest
.
skipIf
(
ThreadPoolExecutor
is
None
,
'multiprocessing required to test __qualname__ for source files'
)
def
test_qualname_source
(
self
):
module
=
importlib
.
import_module
(
'concurrent.futures'
)
member
=
getattr
(
module
,
'ThreadPoolExecutor'
)
rc
,
out
,
err
=
assert_python_ok
(
'-m'
,
'inspect'
,
'concurrent.futures:ThreadPoolExecutor'
)
lines
=
out
.
decode
().
splitlines
()
# ignore the final newline
self
.
assertEqual
(
lines
[:
-
1
],
inspect
.
getsource
(
membe
r
).
splitlines
())
inspect
.
getsource
(
ThreadPoolExecuto
r
).
splitlines
())
self
.
assertEqual
(
err
,
b''
)
def
test_builtins
(
self
):
...
...
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