From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B94FDA0508; Wed, 30 Mar 2022 10:03:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94ED640696; Wed, 30 Mar 2022 10:03:06 +0200 (CEST) Received: from mailgw02.pantheon.sk (mailgw01.pantheon.sk [46.229.239.26]) by mails.dpdk.org (Postfix) with ESMTP id 6A37B40685 for ; Wed, 30 Mar 2022 10:03:05 +0200 (CEST) Received: from mailgw02.pantheon.sk (localhost.localdomain [127.0.0.1]) by mailgw02.pantheon.sk (Proxmox) with ESMTP id 5D7E2183954; Wed, 30 Mar 2022 10:03:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; h=cc:cc:content-transfer-encoding:content-type:content-type :date:from:from:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=dkim; bh=UNtRSk1xeMVjGTOm/ZeL GlRXLlmGzkW5p14ZGInIkeo=; b=VZfyT2uIDUNACrK+07Tlrvoi5hL60aJzU0jA Cos9WNiKHtEFAtBLZyc46fqXBw4/pNbZ6evmCAf0SslT1KiuwgQNPc9xLpZua6hq W2g6y4ecQUMXVak1y6T0vC1g4RJnVe5tvpWYrnXNAeDUjNAuGdsihiK2q1FZNQjq GNblXAzghEu0M0SzXBpheUC9ls6SOH6j2kbLx3F1D79g3W03sxMxgBg9WBJzu/zc 9QCyGuqlPrQcAURJAzKTQ5wG4ZrSO7rPNwIkArDjffUv3joqO5TXDpdFrjfDFX0w suKjD3hFv2Vf31mSCRmTVUDq7p0Jk0Eqy2+WfnqIFLW3sc3LOw== From: =?iso-8859-2?Q?Juraj_Linke=B9?= To: Jun Dong , "dts@dpdk.org" CC: "lijuan.tu@intel.com" , "qingx.sun@intel.com" Subject: RE: [V1] framework/*: Replace framework texttable with third party libary Thread-Topic: [V1] framework/*: Replace framework texttable with third party libary Thread-Index: AQHYRAXGSaU+K2OUH063GMHrCUNSiKzXjrzg Date: Wed, 30 Mar 2022 08:03:02 +0000 Message-ID: References: <20220330071347.1391-1-junx.dong@intel.com> In-Reply-To: <20220330071347.1391-1-junx.dong@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.101.4.10] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org > -----Original Message----- > From: Jun Dong > Sent: Wednesday, March 30, 2022 9:14 AM > To: dts@dpdk.org > Cc: lijuan.tu@intel.com; qingx.sun@intel.com; junx.dong@intel.com > Subject: [V1] framework/*: Replace framework texttable with third party l= ibary >=20 > Signed-off-by: Jun Dong > --- > framework/dts.py | 1 - > framework/test_result.py | 5 +- > framework/texttable.py | 645 --------------------------------------- > requirements.txt | 3 +- > tests/perf_test_base.py | 5 +- > 5 files changed, 8 insertions(+), 651 deletions(-) delete mode 100644 > framework/texttable.py >=20 > diff --git a/framework/test_result.py b/framework/test_result.py index > 0231e769..abf8edb9 100644 > --- a/framework/test_result.py > +++ b/framework/test_result.py > @@ -32,7 +32,6 @@ > """ > Generic result container and reporters > """ > -import framework.texttable as texttable # text format >=20 >=20 > class Result(object): > @@ -445,9 +444,11 @@ class ResultTable(object): > rt.add_row(row) > rt.table_print() > """ > + from texttable import Texttable > + > self.results_table_rows =3D [] > self.results_table_rows.append([]) > - self.table =3D texttable.Texttable(max_width=3D150) > + self.table =3D Texttable(max_width=3D150) > self.results_table_header =3D header > self.logger =3D None > self.rst =3D None Is there a reason for moving the import statement? I'd prefer to have it at= the beginning of the file. > diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py index > 0666f3bf..82ae74f4 100644 > --- a/tests/perf_test_base.py > +++ b/tests/perf_test_base.py > @@ -44,7 +44,6 @@ from pprint import pformat >=20 > import numpy as np >=20 > -import framework.texttable as texttable import framework.utils as utils= from > framework.config import SuiteConf from framework.exception import > VerifyFailure @@ -1039,11 +1038,13 @@ class PerfTestBase(object): > return mode_name >=20 > def __display_suite_result(self, data): > + from texttable import Texttable > + > values =3D data.get("values") > title =3D data.get("title") > max_length =3D sum([len(item) + 5 for item in title]) > self.result_table_create(title) > - self._result_table.table =3D texttable.Texttable(max_width=3Dmax= _length) > + self._result_table.table =3D Texttable(max_width=3Dmax_length) > for value in values: > self.result_table_add(value) > self.result_table_print() > -- > 2.33.1.windows.1 >=20 Same here.