From 003746a2338574b61b7ab2bf5c1f5656b9e6ebd5 Mon Sep 17 00:00:00 2001 From: zhenyu-ms <111329301+zhenyu-ms@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:14:22 +0800 Subject: [PATCH] add newsfrag; fix a table.log bug --- .../2837_changed.dependencies_accept_remote_driver.rst | 1 + examples/Assertions/Basic/test_plan_table.py | 5 +++++ pyproject.toml | 2 +- testplan/testing/multitest/entries/stdout/base.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 doc/newsfragments/2837_changed.dependencies_accept_remote_driver.rst diff --git a/doc/newsfragments/2837_changed.dependencies_accept_remote_driver.rst b/doc/newsfragments/2837_changed.dependencies_accept_remote_driver.rst new file mode 100644 index 000000000..8592b0779 --- /dev/null +++ b/doc/newsfragments/2837_changed.dependencies_accept_remote_driver.rst @@ -0,0 +1 @@ +Support :py:class:`RemoteDriver ` in dependency graph of test environment (the ``dependencies`` parameter). \ No newline at end of file diff --git a/examples/Assertions/Basic/test_plan_table.py b/examples/Assertions/Basic/test_plan_table.py index 6c4ede8c6..fef0869e3 100755 --- a/examples/Assertions/Basic/test_plan_table.py +++ b/examples/Assertions/Basic/test_plan_table.py @@ -41,6 +41,8 @@ def test_table_namespace(self, env, result): ["Rick", 67], ] + tuple_of_tuples = tuple(tuple(r) for r in list_of_lists) + sample_table = [ ["symbol", "amount"], ["AAPL", 12], @@ -61,6 +63,9 @@ def test_table_namespace(self, env, result): display_index=True, description="Table Log: list of lists", ) + result.table.log( + tuple_of_tuples, description="Table Log: tuple of tuples" + ) result.table.log(list_of_lists[:1], description="Empty table") result.table.log( [{"name": "Bob", "age": 32}, {"name": "Susan"}], diff --git a/pyproject.toml b/pyproject.toml index ac37fb88c..f0c3295c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ "validators<=0.20.0", "Pillow", "plotly", - "pandas", + "pandas", # required by plotly.express "rpyc", "matplotlib", "memoization", diff --git a/testplan/testing/multitest/entries/stdout/base.py b/testplan/testing/multitest/entries/stdout/base.py index b29b12dc8..479ace633 100644 --- a/testplan/testing/multitest/entries/stdout/base.py +++ b/testplan/testing/multitest/entries/stdout/base.py @@ -138,7 +138,7 @@ def get_details(self, entry: base.TableLog) -> str: if isinstance(cell, bytes): entry.table[j][i] = str(cell) - return AsciiTable([entry.columns] + entry.table).table + return AsciiTable([entry.columns, *entry.table]).table @registry.bind(base.DictLog, base.FixLog)