From d61c29fb218128286f661401cc9fdcab88f9d56e Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:07:25 -0300 Subject: [PATCH] Adjusted error message new ScriptOptions parser in integration tests --- test_container/tests/test/java/general.py | 16 ++++++++-------- test_container/tests/test/java/script_import.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test_container/tests/test/java/general.py b/test_container/tests/test/java/general.py index c3bfc0f4..c203bef3 100755 --- a/test_container/tests/test/java/general.py +++ b/test_container/tests/test/java/general.py @@ -173,7 +173,7 @@ def setUp(self): @useData(((legacy_env_declaration, 'No values found for %jar statement'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:5\] PARSE: Syntax error: Unexpected \'\'"))) + "Error parsing script options at line 1: \[1:5\] PARSE: Syntax error: Unexpected \'\'"))) def test_jar_path(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -187,7 +187,7 @@ def test_jar_path(self, additional_env_declaration, expected_error): @useData(((legacy_env_declaration, 'End of %jar statement not found'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:5\] PARSE: Syntax error: Unexpected \'not_semicolon\'"))) + "Error parsing script options at line 1: \[1:5\] PARSE: Syntax error: Unexpected \'\'"))) def test_jar_path2(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -207,7 +207,7 @@ class TEST_JAR_PATH2 { @useData(((legacy_env_declaration, 'No values found for %jar statement'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:6\] PARSE: Syntax error: Unexpected \';\'"))) + "Error parsing script options at line 1: \[1:6\] PARSE: Syntax error: Unexpected \';\'"))) def test_jar_path3(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -227,7 +227,7 @@ class TEST_JAR_PATH3 { @useData(((legacy_env_declaration, 'End of %jar statement not found'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:20\] PARSE: Syntax error: Unexpected \'\'"))) + "Error parsing script options at line 1: \[1:20\] PARSE: Syntax error: Unexpected \'\'"))) def test_jar_path_end(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -431,7 +431,7 @@ def setUp(self): @useData(((legacy_env_declaration, 'No values found for %jvmoption statement'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:11\] PARSE: Syntax error: Unexpected \'\'"))) + "Error parsing script options at line 1: \[1:11\] PARSE: Syntax error: Unexpected \'\'"))) def test_jvm_opt(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -445,7 +445,7 @@ def test_jvm_opt(self, additional_env_declaration, expected_error): @useData(((legacy_env_declaration, 'End of %jvmoption statement not found'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:11\] PARSE: Syntax error: Unexpected \'not_semicolon\'"))) + "Error parsing script options at line 1: \[1:11\] PARSE: Syntax error: Unexpected \'\'"))) def test_jvm_opt2(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -465,7 +465,7 @@ class TEST_JVM_OPT2 { @useData(((legacy_env_declaration, 'No values found for %jvmoption statement'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:12\] PARSE: Syntax error: Unexpected \';\'"))) + "Error parsing script options at line 1: \[1:12\] PARSE: Syntax error: Unexpected \';\'"))) def test_jvm_opt3(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -485,7 +485,7 @@ class TEST_JVM_OPT3 { @useData(((legacy_env_declaration, 'End of %jvmoption statement not found'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:20\] PARSE: Syntax error: Unexpected \'\'"))) + "Error parsing script options at line 1: \[1:20\] PARSE: Syntax error: Unexpected \'\'"))) def test_jvm_opt4(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT diff --git a/test_container/tests/test/java/script_import.py b/test_container/tests/test/java/script_import.py index 61135279..011b5fd5 100755 --- a/test_container/tests/test/java/script_import.py +++ b/test_container/tests/test/java/script_import.py @@ -67,7 +67,7 @@ class CANNOT_CATCH_IMPORT_EXCEPTION { @useData(((legacy_env_declaration, 'No values found for %import statement'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:8\] PARSE: Syntax error: Unexpected \'\'"))) + "Error parsing script options at line 1: \[1:8\] PARSE: Syntax error: Unexpected \'\'"))) def test_preprocessed_Import_missing_script_name(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -81,7 +81,7 @@ def test_preprocessed_Import_missing_script_name(self, additional_env_declaratio @useData(((legacy_env_declaration, 'End of %import statement not found'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:8\] PARSE: Syntax error: Unexpected \'not_semicolon\'"))) + "Error parsing script options at line 1: \[1:8\] PARSE: Syntax error: Unexpected \'\'"))) def test_preprocessed_Import_missing_script_name2(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -101,7 +101,7 @@ class CANNOT_CATCH_IMPORT_EXCEPTION { @useData(((legacy_env_declaration, 'No values found for %import statement'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:9\] PARSE: Syntax error: Unexpected \';\'"))) + "Error parsing script options at line 1: \[1:9\] PARSE: Syntax error: Unexpected \';\'"))) def test_preprocessed_Import_missing_script_name3(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT @@ -121,7 +121,7 @@ class CANNOT_CATCH_IMPORT_EXCEPTION { @useData(((legacy_env_declaration, 'End of %import statement not found'), (ctpg_parser_env_declaration, - "Error parsing script options: \[1:10\] PARSE: Syntax error: Unexpected \'\'"))) + "Error parsing script options at line 1: \[1:10\] PARSE: Syntax error: Unexpected \'\'"))) def test_preprocessed_Import_missing_import_end(self, additional_env_declaration, expected_error): self.query(udf.fixindent(''' CREATE OR REPLACE java SCALAR SCRIPT