Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Zope
Commits
59be7022
Commit
59be7022
authored
Apr 03, 2010
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tests for App.Extensions.FuncCode
parent
fbb3b96d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
src/App/tests/test_Extensions.py
src/App/tests/test_Extensions.py
+31
-0
No files found.
src/App/tests/test_Extensions.py
View file @
59be7022
...
...
@@ -51,6 +51,37 @@ class FuncCodeTests(unittest.TestCase):
self
.
assertEqual
(
fc
.
co_varnames
,
(
'a'
,
'b'
))
self
.
assertEqual
(
fc
.
co_argcount
,
2
)
def
test___cmp___None
(
self
):
def
f
(
self
):
pass
fc
=
self
.
_makeOne
(
f
,
im
=
1
)
self
.
failUnless
(
cmp
(
fc
,
None
)
>
0
)
def
test___cmp___non_FuncCode
(
self
):
def
f
(
self
):
pass
fc
=
self
.
_makeOne
(
f
,
im
=
1
)
self
.
failUnless
(
cmp
(
fc
,
object
())
>
0
)
def
test___cmp___w_FuncCode_same_args
(
self
):
def
f
(
self
,
a
,
b
):
pass
def
g
(
self
,
a
,
b
):
pass
fc
=
self
.
_makeOne
(
f
,
im
=
1
)
fc2
=
self
.
_makeOne
(
g
,
im
=
1
)
self
.
failUnless
(
cmp
(
fc
,
fc2
)
==
0
)
def
test___cmp___w_FuncCode_different_args
(
self
):
def
f
(
self
):
pass
def
g
(
self
,
a
,
b
):
pass
fc
=
self
.
_makeOne
(
f
,
im
=
1
)
fc2
=
self
.
_makeOne
(
g
,
im
=
1
)
self
.
failUnless
(
cmp
(
fc
,
fc2
)
<
0
)
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
FuncCodeTests
),
...
...
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