#640: Refactored generic tests for r#644
Conversation
This reverts commit cf3fcc1.
| sql_content = f.read() | ||
|
|
||
| # Execute each CREATE SCRIPT statement | ||
| statements = re.split(r'^\s*/\s*$', sql_content, flags=re.MULTILINE) |
There was a problem hiding this comment.
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']: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Was this commented in the original
| self.query(stmt) | ||
|
|
||
|
|
||
| def setUp(self): |
| self.query('OPEN SCHEMA FN1') | ||
|
|
||
| # Load R scripts from SQL file | ||
| sql_file = pathlib.Path(__file__).parent.parent.parent.parent / 'lang' / 'r' / 'performance.sql' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Ok, we wanted the UDFs created inside this file and not read from a SQL file
relates to #640
generic tests for r alone
this branch is branched out from refactor/640_bring_db_obs_in_gen_lang_tests