From 98593d05e7514d00a2f9c933dcd0f2730b72641d Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 26 Oct 2023 17:00:11 -0400 Subject: [PATCH 1/2] case_sparql_select: Update JSON index and orient parameter combinations A follow-on patch will regenerate Make-managed files. References: * https://github.com/pandas-dev/pandas/pull/52143 Signed-off-by: Alex Nelson --- .../test_data_frame_to_table_text_json.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py b/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py index 545666c..7533cc2 100644 --- a/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py +++ b/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py @@ -55,10 +55,22 @@ def make_data_frame_to_json_table_text_parameters() -> ( "values", ]: # Handle incompatible parameter pairings for JSON mode. - if use_index is False: - if json_orient not in {"split", "table"}: + if use_index is True: + if json_orient not in { + "columns", + "index", + "split", + "table", + }: + continue + elif use_index is False: + if json_orient not in { + "records", + "split", + "table", + "values", + }: continue - yield (json_orient, output_mode, use_header, use_index) else: yield ("columns", output_mode, use_header, use_index) From 4fc448aeb607a6cd641d55cd72617f28a5cab029 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 26 Oct 2023 17:01:07 -0400 Subject: [PATCH 2/2] Regenerate Make-managed files Signed-off-by: Alex Nelson --- ...check-w3-output-with_header-without_index-orient-records.json | 1 + ....check-w3-output-with_header-without_index-orient-values.json | 1 + ...ck-w3-output-without_header-without_index-orient-records.json | 1 + ...eck-w3-output-without_header-without_index-orient-values.json | 1 + 4 files changed, 4 insertions(+) create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json new file mode 100644 index 0000000..f053616 --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json @@ -0,0 +1 @@ +[{"?name":"Johnny Lee Outlaw","?mbox":"mailto:jlow@example.com"},{"?name":"Peter Goodguy","?mbox":"mailto:peter@example.org"}] diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json new file mode 100644 index 0000000..e49c3eb --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json @@ -0,0 +1 @@ +[["Johnny Lee Outlaw","mailto:jlow@example.com"],["Peter Goodguy","mailto:peter@example.org"]] diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json new file mode 100644 index 0000000..f053616 --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json @@ -0,0 +1 @@ +[{"?name":"Johnny Lee Outlaw","?mbox":"mailto:jlow@example.com"},{"?name":"Peter Goodguy","?mbox":"mailto:peter@example.org"}] diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json new file mode 100644 index 0000000..e49c3eb --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json @@ -0,0 +1 @@ +[["Johnny Lee Outlaw","mailto:jlow@example.com"],["Peter Goodguy","mailto:peter@example.org"]]