From 2070e7399f69003337b078f897c55829d160a040 Mon Sep 17 00:00:00 2001 From: Tristan New Date: Sun, 6 Aug 2023 18:19:09 +0100 Subject: [PATCH 1/2] test case for None --- tests/test_tables.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_tables.py b/tests/test_tables.py index 110cd94f3..6b138f0cb 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -775,6 +775,18 @@ def test_append_row(table): g | 2 | 2 """) +def test_append_none(table): + row = [[], None, "", 0] + for i in row: + table.append(row) + assert_equal(table, """ + letter | count | points + a | 9 | 1 + b | 3 | 2 + c | 3 | 2 + z | 1 | 10 + """) + def test_append_row_by_array(table): row = np.array(['g', 2, 2]) table.append(row) From e4dfccc9a771d9d9f64b24161f63c32a855ade06 Mon Sep 17 00:00:00 2001 From: Tristan New Date: Sun, 6 Aug 2023 21:10:37 +0100 Subject: [PATCH 2/2] typo fix --- tests/test_tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_tables.py b/tests/test_tables.py index 6b138f0cb..0cb8ba928 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -778,7 +778,7 @@ def test_append_row(table): def test_append_none(table): row = [[], None, "", 0] for i in row: - table.append(row) + table.append(i) assert_equal(table, """ letter | count | points a | 9 | 1