Merge ~chad.smith/cloud-init:cleanup/py26-skipif into cloud-init:master

Proposed by Chad Smith
Status: Merged
Approved by: Chad Smith
Approved revision: 7a94cae1610a8365a35ab1569ba65f1329006dc7
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~chad.smith/cloud-init:cleanup/py26-skipif
Merge into: cloud-init:master
Diff against target: 42 lines (+1/-16)
1 file modified
cloudinit/tests/helpers.py (+1/-16)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Scott Moser Approve
Review via email: mp+354070@code.launchpad.net

Commit message

Fix the built-in cloudinit/tests/helpers:skipIf

this version uses unittest2 skipIf which is present in our python 2.6
environment.

Author: Scott Moser <email address hidden>

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.ubuntu.com/server/job/cloud-init-autoland-test/41/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Unit & Style Tests

review: Needs Fixing (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

fix the style:

cloudinit/tests/helpers.py:13: 'unittest' imported but unused

then i approve.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Autolanding.
Unapproved changes made after approval.
https://jenkins.ubuntu.com/server/job/cloud-init-autoland-test/43/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.ubuntu.com/server/job/cloud-init-autoland-test/42/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Unit & Style Tests

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
2index 5bfe7fa..a022a7a 100644
3--- a/cloudinit/tests/helpers.py
4+++ b/cloudinit/tests/helpers.py
5@@ -10,7 +10,6 @@ import shutil
6 import sys
7 import tempfile
8 import time
9-import unittest
10
11 import mock
12 import six
13@@ -33,6 +32,7 @@ from cloudinit import util
14
15 # Used for skipping tests
16 SkipTest = unittest2.SkipTest
17+skipIf = unittest2.skipIf
18
19 # Used for detecting different python versions
20 PY2 = False
21@@ -426,21 +426,6 @@ def readResource(name, mode='r'):
22
23
24 try:
25- skipIf = unittest.skipIf
26-except AttributeError:
27- # Python 2.6. Doesn't have to be high fidelity.
28- def skipIf(condition, reason):
29- def decorator(func):
30- def wrapper(*args, **kws):
31- if condition:
32- return func(*args, **kws)
33- else:
34- print(reason, file=sys.stderr)
35- return wrapper
36- return decorator
37-
38-
39-try:
40 import jsonschema
41 assert jsonschema # avoid pyflakes error F401: import unused
42 _missing_jsonschema_dep = False

Subscribers

People subscribed via source and target branches