test suite reviews and discussions
 help / color / mirror / Atom feed
From: Yong Liu <yong.liu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH] framework: fix pep8 issue in source code
Date: Sun, 15 Feb 2015 13:45:30 +0800	[thread overview]
Message-ID: <1423979130-14694-1-git-send-email-yong.liu@intel.com> (raw)

All python code in DTS should follow pep8 code styple. Fixed some code not
match pep8 and ingore E501(line too long).

Signed-off-by: Marvinliu <yong.liu@intel.com>

diff --git a/framework/dut.py b/framework/dut.py
index 161c3fc..267e7f1 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -170,7 +170,6 @@ class Dut(Crb):
         if self.ports_map is None or len(self.ports_map) == 0:
             raise ValueError("ports_map should not be empty, please check all links")
 
-
     def restore_interfaces(self):
         """
         Restore all ports's interfaces.
@@ -234,7 +233,7 @@ class Dut(Crb):
                 arch_huge_pages = hugepages if hugepages > 0 else 1024
             elif self.architecture == "i686":
                 arch_huge_pages = hugepages if hugepages > 0 else 512
-            #set huge pagesize for x86_x32 abi target
+            # set huge pagesize for x86_x32 abi target
             elif self.architecture == "x86_x32":
                 arch_huge_pages = hugepages if hugepages > 0 else 256
 
diff --git a/framework/settings.py b/framework/settings.py
index 7f192d0..41c9c2c 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -32,9 +32,9 @@
 Folders for framework running enviornment.
 """
 FOLDERS = {
-    'Framework'     : 'framework',
-    'Testscripts'   : 'tests',
-    'Configuration' : 'conf',
+    'Framework': 'framework',
+    'Testscripts': 'tests',
+    'Configuration': 'conf',
 }
 
 """
@@ -94,7 +94,7 @@ DRIVERS = {
     'I218LM': 'igb',
     'fortville_eagle': 'i40e',
     'fortville_spirit': 'i40e',
-    'fortville_spirit_single':'i40e',
+    'fortville_spirit_single': 'i40e',
     'redrockcanyou': 'fm10k',
 }
 
diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py
index f3debc1..fb9043a 100644
--- a/framework/ssh_connection.py
+++ b/framework/ssh_connection.py
@@ -61,8 +61,8 @@ class SSHConnection(object):
     def isalive(self):
         return self.session.isalive()
 
-    def copy_file_from(self, src, dst = ".", password=''):
+    def copy_file_from(self, src, dst=".", password=''):
         self.session.copy_file_from(src, dst, password)
 
-    def copy_file_to(self, src, dst = "~/", password=''):
+    def copy_file_to(self, src, dst="~/", password=''):
         self.session.copy_file_to(src, dst, password)
diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py
index d293fe2..d85c2eb 100644
--- a/framework/ssh_pexpect.py
+++ b/framework/ssh_pexpect.py
@@ -78,7 +78,7 @@ class SSHPexpect(object):
     def isalive(self):
         return self.session.isalive()
 
-    def copy_file_from(self, src, dst = ".", password=''):
+    def copy_file_from(self, src, dst=".", password=''):
         """
         Copies a file from a remote place into local.
         """
@@ -88,7 +88,7 @@ class SSHPexpect(object):
         else:
             self._spawn_scp(command, password)
 
-    def copy_file_to(self, src, dst = "~/", password=''):
+    def copy_file_to(self, src, dst="~/", password=''):
         """
         Sends a local file to a remote place.
         """
diff --git a/framework/test_case.py b/framework/test_case.py
index c5dd10f..66f7262 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -79,6 +79,6 @@ class TestCase(object):
         elif self.nic in ["fortville_spirit", "fortville_spirit_single"]:
             bitrate *= 40
         elif self.nic == 'fortville_eagle':
-           bitrate *= 10
+            bitrate *= 10
 
         return bitrate * num_ports / 8 / (frame_size + 20)
-- 
1.9.3

                 reply	other threads:[~2015-02-15  5:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423979130-14694-1-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).