blob: d0c44da92a504ce1df3cc3ff3308717427d64e55 [file] [log] [blame]
Justin Shepherd0d9bbd12011-08-11 12:57:44 -05001# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
3# Copyright 2011 OpenStack, LLC
4# All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
17
18"""
19Functional test case to check the status of gepetto and
20set information of hosts etc..
21"""
22
23import os
24import tests
25import unittest2
26
27
28class TestSkipExamples(tests.FunctionalTest):
29 @tests.skip_test("testing skipping")
30 def test_absolute_skip(self):
31 x = 1
32
33 @tests.skip_unless(os.getenv("BLAH"),
34 "Skipping -- Environment variable BLAH does not exist")
35 def test_skip_unless_env_blah_exists(self):
36 x = 1
37
38 @tests.skip_unless(os.getenv("USER"),
39 "Not Skipping -- Environment variable USER does not exist")
40 def test_skip_unless_env_user_exists(self):
41 x = 1
42
43 @tests.skip_if(os.getenv("USER"),
44 "Skiping -- Environment variable USER exists")
45 def test_skip_if_env_user_exists(self):
46 x = 1
47
48 @tests.skip_if(os.getenv("BLAH"),
49 "Not Skipping -- Environment variable BLAH exists")
50 def test_skip_if_env_blah_exists(self):
51 x = 1
52
53 def test_tags_example(self):
54 pass
55 test_tags_example.tags = ['kvm', 'olympus']