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
813b0e5b
Commit
813b0e5b
authored
May 21, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test_inspect pass once again.
parent
2a857de6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Lib/inspect.py
Lib/inspect.py
+1
-1
Lib/test/test_inspect.py
Lib/test/test_inspect.py
+2
-1
No files found.
Lib/inspect.py
View file @
813b0e5b
...
...
@@ -313,7 +313,7 @@ def getdoc(object):
doc
=
object
.
__doc__
except
AttributeError
:
return
None
if
not
isinstance
(
doc
,
types
.
StringTypes
):
if
not
isinstance
(
doc
,
basestring
):
return
None
try
:
lines
=
doc
.
expandtabs
().
split
(
'
\
n
'
)
...
...
Lib/test/test_inspect.py
View file @
813b0e5b
...
...
@@ -3,6 +3,7 @@ import types
import
unittest
import
inspect
import
datetime
import
collections
from
test.test_support
import
TESTFN
,
run_unittest
...
...
@@ -60,7 +61,7 @@ class TestPredicates(IsTestBase):
self
.
istest
(
inspect
.
ismethod
,
'git.argue'
)
self
.
istest
(
inspect
.
ismodule
,
'mod'
)
self
.
istest
(
inspect
.
istraceback
,
'tb'
)
self
.
istest
(
inspect
.
isdatadescriptor
,
'
__builtin__.file.closed
'
)
self
.
istest
(
inspect
.
isdatadescriptor
,
'
collections.defaultdict.default_factory
'
)
if
hasattr
(
types
,
'GetSetDescriptorType'
):
self
.
istest
(
inspect
.
isgetsetdescriptor
,
'type(tb.tb_frame).f_locals'
)
...
...
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