Skip to content

Commit

Permalink
Adjusted error message new ScriptOptions parser in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Oct 29, 2024
1 parent 5c5e65b commit d61c29f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions test_container/tests/test/java/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \'<eof>\'")))
"Error parsing script options at line 1: \[1:5\] PARSE: Syntax error: Unexpected \'<eof>\'")))
def test_jar_path(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand All @@ -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 \'<eof>\'")))
def test_jar_path2(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand All @@ -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
Expand All @@ -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 \'<eof>\'")))
"Error parsing script options at line 1: \[1:20\] PARSE: Syntax error: Unexpected \'<eof>\'")))
def test_jar_path_end(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand Down Expand Up @@ -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 \'<eof>\'")))
"Error parsing script options at line 1: \[1:11\] PARSE: Syntax error: Unexpected \'<eof>\'")))
def test_jvm_opt(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand All @@ -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 \'<eof>\'")))
def test_jvm_opt2(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand All @@ -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
Expand All @@ -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 \'<eof>\'")))
"Error parsing script options at line 1: \[1:20\] PARSE: Syntax error: Unexpected \'<eof>\'")))
def test_jvm_opt4(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand Down
8 changes: 4 additions & 4 deletions test_container/tests/test/java/script_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \'<eof>\'")))
"Error parsing script options at line 1: \[1:8\] PARSE: Syntax error: Unexpected \'<eof>\'")))
def test_preprocessed_Import_missing_script_name(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand All @@ -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 \'<eof>\'")))
def test_preprocessed_Import_missing_script_name2(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand All @@ -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
Expand All @@ -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 \'<eof>\'")))
"Error parsing script options at line 1: \[1:10\] PARSE: Syntax error: Unexpected \'<eof>\'")))
def test_preprocessed_Import_missing_import_end(self, additional_env_declaration, expected_error):
self.query(udf.fixindent('''
CREATE OR REPLACE java SCALAR SCRIPT
Expand Down

0 comments on commit d61c29f

Please sign in to comment.