Joshua Powers has proposed merging ~powersj/cloud-init:style-fix into 
cloud-init:master.

Commit message:
test: Fix lint check of unused import

The jsonschema package is used only when available, but the lint
check thinks the import is unused across pyflakes and flake8. In
order to avoid having exceptions for both assert that the import
works right after and the import is considered used.

LP: #1695918

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/325274
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~powersj/cloud-init:style-fix into cloud-init:master.
diff --git a/tests/unittests/test_handler/test_handler_ntp.py b/tests/unittests/test_handler/test_handler_ntp.py
index 25d7365..b34e063 100644
--- a/tests/unittests/test_handler/test_handler_ntp.py
+++ b/tests/unittests/test_handler/test_handler_ntp.py
@@ -17,7 +17,8 @@ pools {{pools}}
 """
 
 try:
-    import jsonschema  # NOQA
+    import jsonschema
+    assert jsonschema
     _missing_jsonschema_dep = False
 except ImportError:
     _missing_jsonschema_dep = True
diff --git a/tests/unittests/test_handler/test_schema.py b/tests/unittests/test_handler/test_schema.py
index fd0e4f5..af58727 100644
--- a/tests/unittests/test_handler/test_schema.py
+++ b/tests/unittests/test_handler/test_schema.py
@@ -13,7 +13,8 @@ from six import StringIO
 from textwrap import dedent
 
 try:
-    import jsonschema  # NOQA
+    import jsonschema
+    assert jsonschema
     _missing_jsonschema_dep = False
 except ImportError:
     _missing_jsonschema_dep = True
_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to