1 |
#!/usr/bin/env python |
2 |
# -*- coding: utf-8 -*- |
3 |
# |
4 |
# Licensed to the Apache Software Foundation (ASF) under one |
5 |
# or more contributor license agreements. See the NOTICE file |
6 |
# distributed with this work for additional information |
7 |
# regarding copyright ownership. The ASF licenses this file |
8 |
# to you under the Apache License, Version 2.0 (the |
9 |
# "License"); you may not use this file except in compliance |
10 |
# with the License. You may obtain a copy of the License at |
11 |
# |
12 |
# http://www.apache.org/licenses/LICENSE-2.0 |
13 |
# |
14 |
# Unless required by applicable law or agreed to in writing, |
15 |
# software distributed under the License is distributed on an |
16 |
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
17 |
# KIND, either express or implied. See the License for the |
18 |
# specific language governing permissions and limitations |
19 |
# under the License. |
20 |
# |
21 |
# |
22 |
# Copyright (C) 2003, 2004, 2005 Edgewall Software |
23 |
# Copyright (C) 2003, 2004, 2005 Jonas Borgström <jonas@edgewall.com> |
24 |
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> |
25 |
# |
26 |
# All rights reserved. |
27 |
# |
28 |
# Redistribution and use in source and binary forms, with or without |
29 |
# modification, are permitted provided that the following conditions |
30 |
# are met: |
31 |
# |
32 |
# 1. Redistributions of source code must retain the above copyright |
33 |
# notice, this list of conditions and the following disclaimer. |
34 |
# 2. Redistributions in binary form must reproduce the above copyright |
35 |
# notice, this list of conditions and the following disclaimer in the |
36 |
# the documentation and/or other materials provided with the |
37 |
# distribution. |
38 |
# 3. The name of the author may not be used to endorse or promote |
39 |
# products derived from this software without specific prior written |
40 |
# permission. |
41 |
# |
42 |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS |
43 |
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
44 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
45 |
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
46 |
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
47 |
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
48 |
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
49 |
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
50 |
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
51 |
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
52 |
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
53 |
|
54 |
import unittest |
55 |
|
56 |
|
57 |
class TestSetup(unittest.TestSuite): |
58 |
""" |
59 |
Test suite decorator that allows a fixture to be setup for a complete |
60 |
suite of test cases. |
61 |
""" |
62 |
def setUp(self): |
63 |
pass |
64 |
|
65 |
def tearDown(self): |
66 |
pass |
67 |
|
68 |
def __call__(self, result): |
69 |
self.setUp() |
70 |
unittest.TestSuite.__call__(self, result) |
71 |
self.tearDown() |
72 |
return result |