From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2750FB551 for ; Sun, 15 Feb 2015 06:45:39 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 14 Feb 2015 21:45:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,579,1418112000"; d="scan'208";a="527736768" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 14 Feb 2015 21:37:13 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t1F5jYvg025750; Sun, 15 Feb 2015 13:45:34 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t1F5jW8n014731; Sun, 15 Feb 2015 13:45:34 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t1F5jWVH014727; Sun, 15 Feb 2015 13:45:32 +0800 From: Yong Liu To: dts@dpdk.org Date: Sun, 15 Feb 2015 13:45:30 +0800 Message-Id: <1423979130-14694-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] framework: fix pep8 issue in source code X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 05:45:39 -0000 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 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