Skip to content

#640: Refactored generic tests for r#644

Open
sgn4sangar wants to merge 14 commits into
masterfrom
refactor/640_generic_tests_r
Open

#640: Refactored generic tests for r#644
sgn4sangar wants to merge 14 commits into
masterfrom
refactor/640_generic_tests_r

Conversation

@sgn4sangar
Copy link
Copy Markdown
Contributor

relates to #640
generic tests for r alone

this branch is branched out from refactor/640_bring_db_obs_in_gen_lang_tests

sql_content = f.read()

# Execute each CREATE SCRIPT statement
statements = re.split(r'^\s*/\s*$', sql_content, flags=re.MULTILINE)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this went completely wrong, we want the UDF definition in this file


# Load R scripts from SQL files (basic.sql for BASIC_RANGE, combinations.sql for test functions)
lang_path = pathlib.Path(__file__).parent.parent.parent.parent / 'lang' / 'r'
for sql_filename in ['basic.sql', 'combinations.sql']:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this went completely wrong, we want the UDF definition in this file

with open(sql_file, 'r') as f:
sql_content = f.read()

# Execute each CREATE SCRIPT statement
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this went completely wrong, we want the UDF definition in this file

with open(sql_file, 'r') as f:
sql_content = f.read()

# Execute each CREATE SCRIPT statement
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this is weird this reads the create statements from file and a bit below it creates them via self.query

self.query('''create connection SPOT4245 to 'a' user 'b' identified by 'c' ''')


## def test_error_emit_missing(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this commented in the original

self.query(stmt)


def setUp(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double setup

self.query('OPEN SCHEMA FN1')

# Load R scripts from SQL file
sql_file = pathlib.Path(__file__).parent.parent.parent.parent / 'lang' / 'r' / 'performance.sql'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we wanted the UDFs created inside this file and not read from a SQL file

self.query('OPEN SCHEMA FN1')

# Load R scripts from SQL file
sql_file = pathlib.Path(__file__).parent.parent.parent.parent / 'lang' / 'r' / 'performance.sql'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we wanted the UDFs created inside this file and not read from a SQL file

self.query('OPEN SCHEMA FN1')

# Load R scripts from SQL file
sql_file = pathlib.Path(__file__).parent.parent.parent.parent / 'lang' / 'r' / 'unicode.sql'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we wanted the UDFs created inside this file and not read from a SQL file

self.query('OPEN SCHEMA FN1')

# Load R scripts from SQL files (basic.sql for BASIC_RANGE, vectorsize.sql for test functions)
lang_path = pathlib.Path(__file__).parent.parent.parent.parent / 'lang' / 'r'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we wanted the UDFs created inside this file and not read from a SQL file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants