test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: Jun Dong <junx.dong@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "lijuan.tu@intel.com" <lijuan.tu@intel.com>,
	"qingx.sun@intel.com" <qingx.sun@intel.com>
Subject: RE: [V1] framework/*: Replace framework texttable with third party libary
Date: Wed, 30 Mar 2022 08:03:02 +0000	[thread overview]
Message-ID: <cc8c65028ca0449b986348dad1ea6dbf@pantheon.tech> (raw)
In-Reply-To: <20220330071347.1391-1-junx.dong@intel.com>



> -----Original Message-----
> From: Jun Dong <junx.dong@intel.com>
> 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 libary
> 
> Signed-off-by: Jun Dong <junx.dong@intel.com>
> ---
>  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
> 

> 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
> 
> 
>  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 = []
>          self.results_table_rows.append([])
> -        self.table = texttable.Texttable(max_width=150)
> +        self.table = Texttable(max_width=150)
>          self.results_table_header = header
>          self.logger = None
>          self.rst = 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
> 
>  import numpy as np
> 
> -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
> 
>      def __display_suite_result(self, data):
> +        from texttable import Texttable
> +
>          values = data.get("values")
>          title = data.get("title")
>          max_length = sum([len(item) + 5 for item in title])
>          self.result_table_create(title)
> -        self._result_table.table = texttable.Texttable(max_width=max_length)
> +        self._result_table.table = Texttable(max_width=max_length)
>          for value in values:
>              self.result_table_add(value)
>          self.result_table_print()
> --
> 2.33.1.windows.1
> 

Same here.


  reply	other threads:[~2022-03-30  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30  7:13 Jun Dong
2022-03-30  8:03 ` Juraj Linkeš [this message]
2022-04-06 12:15 ` lijuan.tu

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=cc8c65028ca0449b986348dad1ea6dbf@pantheon.tech \
    --to=juraj.linkes@pantheon.tech \
    --cc=dts@dpdk.org \
    --cc=junx.dong@intel.com \
    --cc=lijuan.tu@intel.com \
    --cc=qingx.sun@intel.com \
    /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).