~smoser/cloud-init/snappy-fix-config

« back to all changes in this revision

Viewing changes to tests/unittests/test_cs_util.py

  • Committer: Barry Warsaw
  • Date: 2015-01-27 01:02:31 UTC
  • mto: This revision was merged to the branch mainline in revision 1054.
  • Revision ID: barry@python.org-20150127010231-6wd0pyvtpw6s4jzr
Repair the Python 2.6 tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from __future__ import print_function
 
2
 
 
3
import sys
1
4
import unittest
2
5
 
3
6
from cloudinit.cs_utils import Cepko
4
7
 
 
8
try:
 
9
    skip = unittest.skip
 
10
except AttributeError:
 
11
    # Python 2.6.  Doesn't have to be high fidelity.
 
12
    def skip(reason):
 
13
        def decorator(func):
 
14
            def wrapper(*args, **kws):
 
15
                print(reason, file=sys.stderr)
 
16
            return wrapper
 
17
        return decorator
 
18
 
5
19
 
6
20
SERVER_CONTEXT = {
7
21
    "cpu": 1000,
29
43
# 2015-01-22 BAW: This test is completely useless because it only ever tests
30
44
# the CepkoMock object.  Even in its original form, I don't think it ever
31
45
# touched the underlying Cepko class methods.
32
 
@unittest.skip('This test is completely useless')
 
46
@skip('This test is completely useless')
33
47
class CepkoResultTests(unittest.TestCase):
34
48
    def setUp(self):
35
49
        pass