#640: Refactored generic tests python3#645
Conversation
This reverts commit cf3fcc1.
| CREATE PYTHON3 SET SCRIPT set_returns_has_empty_input(a double) | ||
| RETURNS boolean AS | ||
| def run(ctx): | ||
| return bool(ctx.x is None) | ||
| / |
There was a problem hiding this comment.
Duplication, see line 120.
| ''')) | ||
|
|
||
| self.query(udf.fixindent(''' | ||
| CREATE PYTHON3 SET SCRIPT set_emits_has_empty_input(a double) |
There was a problem hiding this comment.
Duplication, see line 128
| ''')) | ||
|
|
||
| self.query(udf.fixindent(''' | ||
| CREATE PYTHON3 SCALAR SCRIPT performance_map_characters(text VARCHAR(1000)) |
There was a problem hiding this comment.
Duplicate version of this UDF is in file performance.py. But with the current test-framework it can't be moved into a common file. So lets keep it as is for now.
| ''')) | ||
|
|
||
| self.query(udf.fixindent(''' | ||
| CREATE PYTHON3 SET SCRIPT performance_reduce_characters(w CHAR(1), c INTEGER) |
There was a problem hiding this comment.
Duplicate version of this UDF is in file performance.py. But with the current test-framework it can't be moved into a common file. So lets keep it as is for now.
| from exasol_python_test_framework import exatest | ||
|
|
||
|
|
||
| class DynamicOutputCreateScript(udf.TestCase): |
There was a problem hiding this comment.
The tests check that the UDFs were created. Maybe rename then to something like:
DynamicOutputUDFsExistInExaAllScripts
There was a problem hiding this comment.
The UDFs in the test file are created 12x. Once for each test class. Why not doing something similar as in combinations.py: Create a common base class _Python3UdfSetup where create all UDFs and then inherit from this class.
There was a problem hiding this comment.
The 5 UDFs in this file are created 25x, once for each class.
What is most curious here that there is a common base class _Python3UdfSetup which creates the UDFs, but the derived class declare the UDFs again.
relates to #640
generic tests for python3 alone
this branch is branched out from refactor/640_bring_db_obs_in_gen_lang_tests