This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
/
tests.py
52 lines (44 loc) · 1.72 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2005 Zope Foundation 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 the Book Documentation Module
$Id$
"""
__docformat__ = "reStructuredText"
from zope.app.testing import placelesssetup, setup, ztapi
from zope.copypastemove import PrincipalClipboard
from zope.testing import doctest, doctestunit
import unittest
import zope.component
import zope.principalannotation.interfaces
import zope.principalannotation.utility
def setUp(test):
placelesssetup.setUp(test)
setup.setUpTraversal()
zope.component.provideUtility(
zope.principalannotation.utility.PrincipalAnnotationUtility(),
zope.principalannotation.interfaces.IPrincipalAnnotationUtility)
zope.component.provideAdapter(
zope.principalannotation.utility.annotations,
adapts=(None,))
zope.component.provideAdapter(
PrincipalClipboard)
def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite('README.txt',
setUp=setUp, tearDown=placelesssetup.tearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
))
if __name__ == '__main__':
unittest.main(default='test_suite')