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
b1d1a0b6
Commit
b1d1a0b6
authored
Jul 28, 2006
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure the actual number matches the expected count
parent
6907480e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_inspect.py
Lib/test/test_inspect.py
+4
-3
No files found.
Lib/test/test_inspect.py
View file @
b1d1a0b6
...
...
@@ -43,10 +43,11 @@ class IsTestBase(unittest.TestCase):
class
TestPredicates
(
IsTestBase
):
def
test_thirteen
(
self
):
# Doc/lib/libinspect.tex claims there are 13 such functions
count
=
len
(
filter
(
lambda
x
:
x
.
startswith
(
'is'
),
dir
(
inspect
)))
self
.
assertEqual
(
count
,
13
,
"There are %d (not 12) is* functions"
%
count
)
# Doc/lib/libinspect.tex claims there are 13 such functions
expected
=
13
err_msg
=
"There are %d (not %d) is* functions"
%
(
count
,
expected
)
self
.
assertEqual
(
count
,
expected
,
err_msg
)
def
test_excluding_predicates
(
self
):
self
.
istest
(
inspect
.
isbuiltin
,
'sys.exit'
)
...
...
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