Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#857: Updated R to 4.3 and the R package in standard 7.1 flavor #392

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#with UdfDebugger(test_case=self):

Copy link
Collaborator Author

@tkilias tkilias Nov 22, 2023

Choose a reason for hiding this comment

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

I left, that intentional, because it is likely, that this often needed for debugging, but in we shouldn't keep it in the CI, because it can be a little bit flaky.

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
Loading