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

[FSTORE-1446] Merge GitHub Actions #228

Merged
merged 11 commits into from
Jul 16, 2024
Prev Previous commit
Next Next commit
Fix test_hopsworks_udf
  • Loading branch information
aversey committed Jul 16, 2024
commit 96bb1b39a00c8f6a96a2cf9472086d2dd5a156be
32 changes: 16 additions & 16 deletions python/tests/test_hopswork_udf.py
Original file line number Diff line number Diff line change
@@ -99,15 +99,15 @@ def test_get_module_imports(self):
]

def test_extract_source_code(self):
from test_helpers.transformation_test_helper import test_function
from .test_helpers.transformation_test_helper import test_function

assert """import pandas as pd
from hsfs.transformation_statistics import TransformationStatistics
def test_function():
return True""" == HopsworksUdf._extract_source_code(test_function).strip()

def test_extract_function_arguments_no_arguments(self):
from test_helpers.transformation_test_helper import test_function
from .test_helpers.transformation_test_helper import test_function

with pytest.raises(FeatureStoreException) as exception:
HopsworksUdf._extract_function_arguments(test_function)
@@ -118,7 +118,7 @@ def test_extract_function_arguments_no_arguments(self):
)

def test_extract_function_arguments_one_argument(self):
from test_helpers.transformation_test_helper import test_function_one_argument
from .test_helpers.transformation_test_helper import test_function_one_argument

function_argument = HopsworksUdf._extract_function_arguments(
test_function_one_argument
@@ -129,7 +129,7 @@ def test_extract_function_arguments_one_argument(self):
]

def test_extract_function_arguments_one_argument_with_statistics(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_one_argument_with_statistics,
)

@@ -142,7 +142,7 @@ def test_extract_function_arguments_one_argument_with_statistics(self):
]

def test_extract_function_arguments_one_argument_with_typehint(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_one_argument_with_typehints,
)

@@ -157,7 +157,7 @@ def test_extract_function_arguments_one_argument_with_typehint(self):
def test_extract_function_arguments_one_argument_with_statistics_and_typehints(
self,
):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_one_argument_with_statistics_and_typehints,
)

@@ -170,7 +170,7 @@ def test_extract_function_arguments_one_argument_with_statistics_and_typehints(
]

def test_extract_function_arguments_multiple_argument(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument,
)

@@ -184,7 +184,7 @@ def test_extract_function_arguments_multiple_argument(self):
]

def test_extract_function_arguments_multiple_argument_with_statistics(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_with_statistics,
)

@@ -199,7 +199,7 @@ def test_extract_function_arguments_multiple_argument_with_statistics(self):
]

def test_extract_function_arguments_multiple_argument_with_typehints(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_with_typehints,
)

@@ -215,7 +215,7 @@ def test_extract_function_arguments_multiple_argument_with_typehints(self):
def test_extract_function_arguments_multiple_argument_with_statistics_and_typehints(
self,
):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_with_statistics_and_typehints,
)

@@ -231,7 +231,7 @@ def test_extract_function_arguments_multiple_argument_with_statistics_and_typehi
def test_extract_function_arguments_multiple_argument_with_mixed_statistics_and_typehints(
self,
):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_with_mixed_statistics_and_typehints,
)

@@ -248,7 +248,7 @@ def test_extract_function_arguments_multiple_argument_with_mixed_statistics_and_
def test_extract_function_arguments_multiple_argument_all_parameter_with_spaces(
self,
):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_all_parameter_with_spaces,
)

@@ -262,7 +262,7 @@ def test_extract_function_arguments_multiple_argument_all_parameter_with_spaces(
]

def test_extract_function_arguments_multiple_argument_all_parameter_multiline(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_all_parameter_multiline,
)

@@ -279,7 +279,7 @@ def test_extract_function_arguments_multiple_argument_all_parameter_multiline(se
def test_extract_function_arguments_multiple_argumen_all_parameter_multiline_with_comments(
self,
):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_all_parameter_multiline_with_comments,
)

@@ -294,7 +294,7 @@ def test_extract_function_arguments_multiple_argumen_all_parameter_multiline_wit
]

def test_extract_function_arguments_statistics_invalid(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_statistics_invalid,
)

@@ -307,7 +307,7 @@ def test_extract_function_arguments_statistics_invalid(self):
)

def test_format_source_code(self):
from test_helpers.transformation_test_helper import (
from .test_helpers.transformation_test_helper import (
test_function_multiple_argument_all_parameter_multiline_with_comments,
)