1
##############################################################################
3
# Copyright (c) 2004 Zope Corporation and Contributors.
6
# This software is subject to the provisions of the Zope Public License,
7
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
# FOR A PARTICULAR PURPOSE.
13
##############################################################################
16
$Id: samplelayers.py 30501 2005-05-25 17:40:56Z tim_one $
19
layer = '0' # Internal to samples. Not part of layer API
23
# Internal to samples. Not part of layer API:
30
if layer != self.base:
31
raise ValueError("Bad layer, %s, for %s." % (layer, self))
33
setUp = classmethod(setUp)
37
if layer != self.layer:
38
raise ValueError("Bad layer, %s, for %s." % (layer, self))
40
tearDown = classmethod(tearDown)
43
layerx = '1' # Internal to samples. Not part of layer API
48
if layerx != self.basex:
49
raise ValueError("Bad layerx, %s, for %s." % (layerx, self))
51
setUp = classmethod(setUp)
55
if layerx != self.layerx:
56
raise ValueError("Bad layerx, %s, for %s." % (layerx, self))
58
tearDown = classmethod(tearDown)
60
class Layer11(Layer1):
61
layer = '11' # Internal to samples. Not part of layer API
62
base = '1' # Internal to samples. Not part of layer API
64
class Layer12(Layer1):
65
layer = '12' # Internal to samples. Not part of layer API
66
base = '1' # Internal to samples. Not part of layer API
68
class Layer111(Layerx, Layer11):
69
layer = '111' # Internal to samples. Not part of layer API
70
base = '11' # Internal to samples. Not part of layer API
71
layerx = '2' # Internal to samples. Not part of layer API
76
if layer != self.base:
77
raise ValueError("Bad layer, %s, for %s." % (layer, self))
80
if layerx != self.basex:
81
raise ValueError("Bad layerx, %s, for %s." % (layerx, self))
83
setUp = classmethod(setUp)
87
if layer != self.layer:
88
raise ValueError("Bad layer, %s, for %s." % (layer, self))
91
if layerx != self.layerx:
92
raise ValueError("Bad layerx, %s, for %s." % (layerx, self))
94
tearDown = classmethod(tearDown)
96
class Layer121(Layer12):
97
layer = '121' # Internal to samples. Not part of layer API
98
base = '12' # Internal to samples. Not part of layer API
100
class Layer112(Layerx, Layer11):
101
layer = '112' # Internal to samples. Not part of layer API
102
base = '11' # Internal to samples. Not part of layer API
103
layerx = '2' # Internal to samples. Not part of layer API
108
if layer != self.base:
109
raise ValueError("Bad layer, %s, for %s." % (layer, self))
112
if layerx != self.basex:
113
raise ValueError("Bad layerx, %s, for %s." % (layerx, self))
115
setUp = classmethod(setUp)
119
if layer != self.layer:
120
raise ValueError("Bad layer, %s, for %s." % (layer, self))
123
if layerx != self.layerx:
124
raise ValueError("Bad layerx, %s, for %s." % (layerx, self))
126
tearDown = classmethod(tearDown)
128
class Layer122(Layer12):
129
layer = '122' # Internal to samples. Not part of layer API
130
base = '12' # Internal to samples. Not part of layer API