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
diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
index 5bfe7fa..a022a7a 100644
--- a/cloudinit/tests/helpers.py
+++ b/cloudinit/tests/helpers.py
@@ -10,7 +10,6 @@ import shutil
10import sys10import sys
11import tempfile11import tempfile
12import time12import time
13import unittest
1413
15import mock14import mock
16import six15import six
@@ -33,6 +32,7 @@ from cloudinit import util
3332
34# Used for skipping tests33# Used for skipping tests
35SkipTest = unittest2.SkipTest34SkipTest = unittest2.SkipTest
35skipIf = unittest2.skipIf
3636
37# Used for detecting different python versions37# Used for detecting different python versions
38PY2 = False38PY2 = False
@@ -426,21 +426,6 @@ def readResource(name, mode='r'):
426426
427427
428try:428try:
429 skipIf = unittest.skipIf
430except AttributeError:
431 # Python 2.6. Doesn't have to be high fidelity.
432 def skipIf(condition, reason):
433 def decorator(func):
434 def wrapper(*args, **kws):
435 if condition:
436 return func(*args, **kws)
437 else:
438 print(reason, file=sys.stderr)
439 return wrapper
440 return decorator
441
442
443try:
444 import jsonschema429 import jsonschema
445 assert jsonschema # avoid pyflakes error F401: import unused430 assert jsonschema # avoid pyflakes error F401: import unused
446 _missing_jsonschema_dep = False431 _missing_jsonschema_dep = False

Subscribers

People subscribed via source and target branches