diff options
author | 2016-06-08 18:06:07 +0300 | |
---|---|---|
committer | 2016-06-08 18:06:07 +0300 | |
commit | e5ec923e6d837cc5e2d77b7ac93bd652d2563d92 (patch) | |
tree | 8c29039eb6f55a23ea022ad94404cef592fac445 | |
parent | cacad4a8dbafca95b875f1eb619c229d4a7d604d (diff) |
regression: fix representation of errors in setUpClass()
-rwxr-xr-x | scripts/automation/regression/trex_unit_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py index 83650164..c6aeee4d 100755 --- a/scripts/automation/regression/trex_unit_test.py +++ b/scripts/automation/regression/trex_unit_test.py @@ -48,6 +48,13 @@ import re import time from distutils.dir_util import mkpath +# override nose's strange representation of setUpClass errors +def __suite_repr__(self): + return "%s.%s" % (nose.suite._strclass(self.context), getattr(self.context, '__name__', self.context)) + +nose.suite.ContextSuite.__repr__ = __suite_repr__ +nose.suite.ContextSuite.__str__ = __suite_repr__ + def check_trex_path(trex_path): if os.path.isfile('%s/trex_daemon_server' % trex_path): return os.path.abspath(trex_path) |