[asterisk-commits] test case.py: Fix PEP8 warnings. (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 2 09:40:52 CST 2016


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4544 )

Change subject: test_case.py: Fix PEP8 warnings.
......................................................................


test_case.py: Fix PEP8 warnings.

Change-Id: If1c0767e5747ac61dd2427a1ffa589985b77b655
---
M lib/python/asterisk/test_case.py
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved
  Joshua Colp: Verified



diff --git a/lib/python/asterisk/test_case.py b/lib/python/asterisk/test_case.py
index 9fc07cc..11fa3e9 100644
--- a/lib/python/asterisk/test_case.py
+++ b/lib/python/asterisk/test_case.py
@@ -206,8 +206,8 @@
         # Get those global conditions that are not in the self conditions
         for g_cond in global_conditions:
             disallowed = [i for i in conditions
-                          if i[0].get_name() == g_cond[0].get_name()
-                          and i[1] == g_cond[1]]
+                          if i[0].get_name() == g_cond[0].get_name() and
+                          i[1] == g_cond[1]]
             if len(disallowed) == 0:
                 conditions.append(g_cond)
 
@@ -232,7 +232,7 @@
                Asterisk instances have been specified
         """
         if (self.global_config.config and
-            'asterisk-instances' in self.global_config.config):
+                'asterisk-instances' in self.global_config.config):
             asterisks = self.global_config.config.get('asterisk-instances')
         else:
             asterisks = [{'num': i + 1, 'host': '127.0.0.%d' % (i + 1)}
@@ -316,7 +316,7 @@
             LOGGER.info("Creating AMIFactory %d to %s" % ((i + 1), host))
             try:
                 ami_factory = manager.AMIFactory(actual_user, actual_secret, i,
-                                             on_reconnect=on_reconnect)
+                                                 on_reconnect=on_reconnect)
             except:
                 ami_factory = manager.AMIFactory(actual_user, actual_secret, i)
             deferred = ami_factory.login(ip=host, port=actual_port)
@@ -690,7 +690,7 @@
         Keyword Arguments:
         fail_token A previously created fail token to be removed from the test
         """
-        if not fail_token in self.fail_tokens:
+        if fail_token not in self.fail_tokens:
             LOGGER.warning('Attempted to remove an unknown fail token: %s',
                            fail_token['message'])
             self.passed = False
@@ -847,8 +847,8 @@
             # There should only ever be one match, since we're
             # selecting on a UUID
             originating_channel = [chan for chan in self._test_runs
-                                   if (chan['variable']['testuniqueid']
-                                       == event['value'])][0]
+                                   if (chan['variable']['testuniqueid'] ==
+                                       event['value'])][0]
             self._tracking_channels.append({
                 'channel': event['channel'],
                 'testuniqueid': event['value'],

-- 
To view, visit https://gerrit.asterisk.org/4544
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If1c0767e5747ac61dd2427a1ffa589985b77b655
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list