Skip to content

Commit

Permalink
#857: Updated R to 4.3 and the R package in standard 7.1 flavor (#392)
Browse files Browse the repository at this point in the history
* Added exclude to import_modules test
* Renamed test class, function and sql objects in import_modules test to reflect the file name
  • Loading branch information
tkilias authored Nov 22, 2023
1 parent 0bfb552 commit 39fcb6e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions test_container/tests/test/standard-flavor/all/import_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from exasol_python_test_framework import udf
from exasol_python_test_framework.udf.udf_debug import UdfDebugger

class ScikitLearnTest(udf.TestCase):
class ImportAllModulesTest(udf.TestCase):

def setUp(self):
self.query('create schema scikit_learn', ignore_errors=True)
self.query('create schema import_all_modules', ignore_errors=True)

def test_import_scikit_learn_bug_836(self):
def test_import_all_modules(self):
self.query(udf.fixindent('''
CREATE OR REPLACE PYTHON3 SCALAR SCRIPT scikit_learn.import_scikit_learn()
CREATE OR REPLACE PYTHON3 SCALAR SCRIPT import_all_modules.import_all_modules()
EMITS (module_name VARCHAR(200000), exception_str VARCHAR(200000), status VARCHAR(10)) AS
import sys
Expand Down Expand Up @@ -96,7 +96,8 @@ def test_import_scikit_learn_bug_836(self):
"Cython.Debugger",
"Cython.Build.Tests",
"Cython.Build.IpythonMagic",
"Cython.Coverage"
"Cython.Coverage",
"setuptools.modified"
}
excluded_submodules = (
"sphinxext",
Expand Down Expand Up @@ -184,8 +185,8 @@ def run(ctx):
importer.import_modules()
/
'''))
with UdfDebugger(test_case=self):
rows = self.query('''SELECT scikit_learn.import_scikit_learn() FROM dual''')
#with UdfDebugger(test_case=self):
rows = self.query('''SELECT import_all_modules.import_all_modules() FROM dual''')
print("Number of modules:",len(rows))
failed_imports = [(row[0],row[1]) for row in rows if row[2] == "ERROR"]
for i in failed_imports:
Expand All @@ -196,7 +197,7 @@ def run(ctx):


def tearDown(self):
self.query("drop schema scikit_learn cascade")
self.query("drop schema import_all_modules cascade", ignore_errors=True)


if __name__ == '__main__':
Expand Down

0 comments on commit 39fcb6e

Please sign in to comment.