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
caa4fc8d
Commit
caa4fc8d
authored
May 06, 2005
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test interfaces with verifyClass in addition to verifyObject.
parent
abc79c40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
19 deletions
+36
-19
lib/python/Testing/ZopeTestCase/testInterfaces.py
lib/python/Testing/ZopeTestCase/testInterfaces.py
+36
-19
No files found.
lib/python/Testing/ZopeTestCase/testInterfaces.py
View file @
caa4fc8d
...
@@ -12,97 +12,114 @@
...
@@ -12,97 +12,114 @@
##############################################################################
##############################################################################
"""Interface tests
"""Interface tests
$Id
: testInterfaces.py,v 1.3 2005/01/01 20:38:16 shh42 Exp
$
$Id$
"""
"""
import
os
,
sys
import
os
,
sys
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
from
Testing
import
ZopeTestCase
from
Testing
.ZopeTestCase
import
*
from
Testing.ZopeTestCase.interfaces
import
*
from
Testing.ZopeTestCase.interfaces
import
*
try
:
from
Interface.Verify
import
verifyClass
from
Interface.Verify
import
verifyObject
from
Interface.Verify
import
verifyObject
have_verify
=
1
except
ImportError
:
print
'testInterfaces.py: The tests in this module require Zope >= 2.6'
have_verify
=
0
class
Test
BaseTestCase
(
ZopeTestCase
.
TestCase
):
class
Test
AbstractClasses
(
TestCase
):
_setup_fixture
=
0
def
testIProfiled
(
self
):
self
.
failUnless
(
verifyClass
(
IProfiled
,
Profiled
))
def
testIFunctional
(
self
):
self
.
failUnless
(
verifyClass
(
IFunctional
,
Functional
))
class
TestBaseTestCase
(
TestCase
):
def
testIProfiled
(
self
):
def
testIProfiled
(
self
):
self
.
failUnless
(
verifyClass
(
IProfiled
,
TestCase
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
def
testIZopeTestCase
(
self
):
def
testIZopeTestCase
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeTestCase
,
TestCase
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
class
TestZopeTestCase
(
ZopeTestCase
.
ZopeTestCase
):
class
TestZopeTestCase
(
ZopeTestCase
):
_setup_fixture
=
0
_setup_fixture
=
0
def
testIProfiled
(
self
):
def
testIProfiled
(
self
):
self
.
failUnless
(
verifyClass
(
IProfiled
,
ZopeTestCase
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
def
testIZopeTestCase
(
self
):
def
testIZopeTestCase
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeTestCase
,
ZopeTestCase
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
def
testIZopeSecurity
(
self
):
def
testIZopeSecurity
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeSecurity
,
ZopeTestCase
))
self
.
failUnless
(
verifyObject
(
IZopeSecurity
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeSecurity
,
self
))
class
TestFunctionalTestCase
(
ZopeTestCase
.
FunctionalTestCase
):
class
TestFunctionalTestCase
(
FunctionalTestCase
):
_setup_fixture
=
0
_setup_fixture
=
0
def
testIFunctional
(
self
):
def
testIFunctional
(
self
):
self
.
failUnless
(
verifyClass
(
IFunctional
,
FunctionalTestCase
))
self
.
failUnless
(
verifyObject
(
IFunctional
,
self
))
self
.
failUnless
(
verifyObject
(
IFunctional
,
self
))
def
testIProfiled
(
self
):
def
testIProfiled
(
self
):
self
.
failUnless
(
verifyClass
(
IProfiled
,
FunctionalTestCase
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
def
testIZopeTestCase
(
self
):
def
testIZopeTestCase
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeTestCase
,
FunctionalTestCase
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
def
testIZopeSecurity
(
self
):
def
testIZopeSecurity
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeSecurity
,
FunctionalTestCase
))
self
.
failUnless
(
verifyObject
(
IZopeSecurity
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeSecurity
,
self
))
class
TestPortalTestCase
(
ZopeTestCase
.
PortalTestCase
):
class
TestPortalTestCase
(
PortalTestCase
):
_configure_portal
=
0
_configure_portal
=
0
def
getP
ortal
(
self
):
def
_p
ortal
(
self
):
return
None
return
None
def
testIProfiled
(
self
):
def
testIProfiled
(
self
):
self
.
failUnless
(
verifyClass
(
IProfiled
,
PortalTestCase
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
self
.
failUnless
(
verifyObject
(
IProfiled
,
self
))
def
testIZopeTestCase
(
self
):
def
testIZopeTestCase
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeTestCase
,
PortalTestCase
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeTestCase
,
self
))
def
testIZopeSecurity
(
self
):
def
testIZopeSecurity
(
self
):
self
.
failUnless
(
verifyClass
(
IZopeSecurity
,
PortalTestCase
))
self
.
failUnless
(
verifyObject
(
IZopeSecurity
,
self
))
self
.
failUnless
(
verifyObject
(
IZopeSecurity
,
self
))
def
testIPortalTestCase
(
self
):
def
testIPortalTestCase
(
self
):
self
.
failUnless
(
verifyClass
(
IPortalTestCase
,
PortalTestCase
))
self
.
failUnless
(
verifyObject
(
IPortalTestCase
,
self
))
self
.
failUnless
(
verifyObject
(
IPortalTestCase
,
self
))
def
testIPortalSecurity
(
self
):
def
testIPortalSecurity
(
self
):
self
.
failUnless
(
verifyClass
(
IPortalSecurity
,
PortalTestCase
))
self
.
failUnless
(
verifyObject
(
IPortalSecurity
,
self
))
self
.
failUnless
(
verifyObject
(
IPortalSecurity
,
self
))
def
test_suite
():
def
test_suite
():
from
unittest
import
TestSuite
,
makeSuite
from
unittest
import
TestSuite
,
makeSuite
suite
=
TestSuite
()
suite
=
TestSuite
()
if
have_verify
:
suite
.
addTest
(
makeSuite
(
TestAbstractClasses
))
suite
.
addTest
(
makeSuite
(
TestBaseTestCase
))
suite
.
addTest
(
makeSuite
(
TestBaseTestCase
))
suite
.
addTest
(
makeSuite
(
TestZopeTestCase
))
suite
.
addTest
(
makeSuite
(
TestZopeTestCase
))
suite
.
addTest
(
makeSuite
(
TestFunctionalTestCase
))
suite
.
addTest
(
makeSuite
(
TestFunctionalTestCase
))
suite
.
addTest
(
makeSuite
(
TestPortalTestCase
))
suite
.
addTest
(
makeSuite
(
TestPortalTestCase
))
return
suite
return
suite
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
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