[V1] framework/*: Replace framework texttable with third party library

Juraj Linkeš juraj.linkes at pantheon.tech
Wed Mar 30 13:32:30 CEST 2022


> > > 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.
> 
>    Hi, Juraj Linkeš, thanks for your comments.
>    Sometimes, the trex will be used When execute performance suite,
>    And trex also used texttable that comes from  itself.
>    But, the third party library texttable wasn't full compatible with the trex's
> version,
>    If import texttable in global in DTS framework will effect trex which not import
> again,
>   So, import texttable locally in the DTS framework.
> 

Ah, okay. I guess that's a reasonable workaround. I'm fine with this then.

Acked-by: Juraj Linkeš <juraj.linkes at pantheon.tech>



More information about the dts mailing list