Skip to content

Commit

Permalink
pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jfreeberg committed Aug 2, 2023
1 parent 0712ac2 commit 9af0dba
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run(snowpark_session: Session) -> DataFrame:
session.add_import("src/functions.py", 'src.functions')

print("Running stored procedure...")
result = run(session)
result = run(session)

print("Stored procedure complete:")
result.show()
2 changes: 1 addition & 1 deletion src/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ def combine(string_a: str, string_b: str) -> str:
"""
A sample UDF implementation
"""

return string_a + string_b
9 changes: 9 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
"""
Fixtures and configurations for the PyTest suite
"""

import pytest
from snowflake.snowpark.session import Session
from src.util.local import get_env_var_config

@pytest.fixture
def session(scope='module'):
# pylint: disable=unused-argument
"""
Creates a Session object for tests
"""

return Session.builder.configs(get_env_var_config()).create()
4 changes: 4 additions & 0 deletions test/test_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Tests for the procedure module.
"""

from snowflake.snowpark.session import Session
from src.app import run

Expand Down
5 changes: 4 additions & 1 deletion test/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from src.functions import combine
"""
Tests for the functions module.
"""

from src.functions import combine

def test_combine():
expected = "hello world"
Expand Down

0 comments on commit 9af0dba

Please sign in to comment.