Skip to content

Commit

Permalink
Fix test_hopsworks_udf
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 15, 2024
1 parent ddff148 commit 8aebb63
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions python/tests/test_hopswork_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand All @@ -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,
)

Expand Down

0 comments on commit 8aebb63

Please sign in to comment.