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
5d028e57
Commit
5d028e57
authored
Feb 19, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
looks like this test only worked with 2.1 because 2.1 supports func attrs
parent
32574117
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
47 deletions
+1
-47
lib/Components/ExtensionClass/test/output/test_func_attr
lib/Components/ExtensionClass/test/output/test_func_attr
+0
-7
lib/Components/ExtensionClass/test/regrtest.py
lib/Components/ExtensionClass/test/regrtest.py
+1
-1
lib/Components/ExtensionClass/test/test_func_attr.py
lib/Components/ExtensionClass/test/test_func_attr.py
+0
-39
No files found.
lib/Components/ExtensionClass/test/output/test_func_attr
deleted
100644 → 0
View file @
32574117
test_func_attr
Trying function wo attributes
Trying method wo attributes
Trying setting function attribute
Trying function w attributes
Trying method w attributes
Trying method getattr
lib/Components/ExtensionClass/test/regrtest.py
View file @
5d028e57
...
...
@@ -7,7 +7,7 @@ import test.regrtest
ec_tests
=
[
"test_AqAlg"
,
"test_MultiMapping"
,
"test_Sync"
,
"test_ThreadLock"
,
"test_acquisition"
,
"test_add"
,
"test_binding"
,
"test_explicit_acquisition"
,
"test_
func_attr"
,
"test_
method_hook"
]
"test_method_hook"
]
ec_testdir
=
os
.
path
.
split
(
sys
.
argv
[
0
])[
0
]
or
'.'
...
...
lib/Components/ExtensionClass/test/test_func_attr.py
deleted
100644 → 0
View file @
32574117
#! /usr/bin/env python
"""Test function attributes
Jim Fulton
"""
verbose
=
1
from
ExtensionClass
import
Base
def
f
(
a
):
return
a
*
a
class
C
(
Base
):
def
m
(
self
,
a
):
return
a
*
a
m
.
spam
=
'eggs'
i
=
C
()
if
verbose
:
print
'Trying function wo attributes'
if
f
(
2
)
!=
4
:
print
'failed'
if
verbose
:
print
'Trying method wo attributes'
if
i
.
m
(
2
)
!=
4
:
print
'failed'
if
verbose
:
print
'Trying setting function attribute'
f
.
spam
=
'eggs'
if
verbose
:
print
'Trying function w attributes'
if
f
(
2
)
!=
4
:
print
'failed'
if
verbose
:
print
'Trying method w attributes'
if
i
.
m
(
2
)
!=
4
:
print
'failed'
if
verbose
:
print
'Trying method getattr'
try
:
if
i
.
m
.
spam
!=
'eggs'
:
print
'failed'
except
AttributeError
:
print
'failed'
try
:
i
.
m
.
foo
print
'failed'
except
AttributeError
:
pass
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