rearrange testing code
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2593 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
a932deff3e
commit
66ea2a15bc
4 changed files with 27 additions and 4 deletions
|
@ -14,7 +14,7 @@ Let's do some basic set up
|
|||
|
||||
>>> from zope import component
|
||||
|
||||
>>> from cybertools.integrator.tests import testDir
|
||||
>>> from cybertools.integrator.tests.test_all import testDir
|
||||
>>> from cybertools.integrator.filesystem import ContainerFactory, FileFactory
|
||||
>>> from cybertools.integrator.interfaces import IContainerFactory
|
||||
>>> component.provideUtility(ContainerFactory(), name='filesystem')
|
||||
|
|
3
integrator/tests/__init__.py
Normal file
3
integrator/tests/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
"""
|
||||
$Id$
|
||||
"""
|
|
@ -6,7 +6,7 @@ from zope.testing.doctestunit import DocFileSuite
|
|||
from zope.interface.verify import verifyClass
|
||||
|
||||
|
||||
baseDir = os.path.dirname(__file__)
|
||||
baseDir = os.path.dirname(os.path.dirname(__file__))
|
||||
testDir = os.path.join(baseDir, 'testing', 'data')
|
||||
|
||||
flags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
|
||||
|
@ -22,8 +22,8 @@ class Test(unittest.TestCase):
|
|||
def test_suite():
|
||||
return unittest.TestSuite((
|
||||
unittest.makeSuite(Test),
|
||||
DocFileSuite('README.txt', optionflags=flags),
|
||||
DocFileSuite('bscw.txt', optionflags=flags),
|
||||
DocFileSuite('../README.txt', optionflags=flags),
|
||||
DocFileSuite('../bscw.txt', optionflags=flags),
|
||||
))
|
||||
|
||||
if __name__ == '__main__':
|
20
integrator/tests/test_bscw.py
Executable file
20
integrator/tests/test_bscw.py
Executable file
|
@ -0,0 +1,20 @@
|
|||
# $Id$
|
||||
|
||||
import os
|
||||
import unittest, doctest
|
||||
from zope.testing.doctestunit import DocFileSuite
|
||||
from zope.interface.verify import verifyClass
|
||||
|
||||
|
||||
baseDir = os.path.dirname(os.path.dirname(__file__))
|
||||
testDir = os.path.join(baseDir, 'testing', 'data')
|
||||
|
||||
flags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
|
||||
|
||||
def test_suite():
|
||||
return unittest.TestSuite((
|
||||
DocFileSuite('../bscw.txt', optionflags=flags),
|
||||
))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(defaultTest='test_suite')
|
Loading…
Add table
Reference in a new issue