cybertools/pyscript/tests.py
helmutm dc7aa556c5 new package pyscript, derived from zope.app.PythonPage
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1867 fd906abe-77d9-0310-91a1-e0d9ade77398
2007-08-02 20:19:39 +00:00

58 lines
1.9 KiB
Python

##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Tests for Python Page
$Id$
"""
import unittest
import zope.component
from zope.interface import implements
from zope.testing.doctestunit import DocTestSuite
from zope.traversing.interfaces import IContainmentRoot
from zope.traversing.interfaces import IPhysicallyLocatable
from zope.traversing.adapters import RootPhysicallyLocatable
from zope.location.traversing import LocationPhysicallyLocatable
from zope.app.container.contained import Contained
#from zope.app.interpreter.interfaces import IInterpreter
#from zope.app.interpreter.python import PythonInterpreter
from zope.app.testing import placelesssetup, ztapi
class Root(Contained):
implements(IContainmentRoot)
__parent__ = None
__name__ = 'root'
def setUp(test):
placelesssetup.setUp()
sm = zope.component.getGlobalSiteManager()
#sm.registerUtility(PythonInterpreter, IInterpreter, 'text/server-python')
ztapi.provideAdapter(None, IPhysicallyLocatable,
LocationPhysicallyLocatable)
ztapi.provideAdapter(IContainmentRoot, IPhysicallyLocatable,
RootPhysicallyLocatable)
def test_suite():
return unittest.TestSuite((
DocTestSuite('cybertools.pyscript',
setUp=setUp, tearDown=placelesssetup.tearDown),
))
if __name__ == '__main__':
unittest.main()