test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework: fix pep8 issue in source code
@ 2015-02-15  5:45 Yong Liu
  0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2015-02-15  5:45 UTC (permalink / raw)
  To: dts

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-15  5:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-15  5:45 [dts] [PATCH] framework: fix pep8 issue in source code Yong Liu

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).