Skip to content

Commit 2b215d1

Browse files
SNOW-2387227: Use session-scoped session.
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
1 parent 183a392 commit 2b215d1

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/snowflake/snowpark/modin/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import snowflake.snowpark.modin.plugin # pragma: no cover # noqa: F401
1212

1313

14-
@pytest.fixture(autouse=True, scope="module") # pragma: no cover
14+
@pytest.fixture(autouse=True, scope="session") # pragma: no cover
1515
def add_doctest_imports(doctest_namespace) -> None: # pragma: no cover
1616
"""
1717
Make `np` and `pd` names available for doctests.
@@ -20,7 +20,7 @@ def add_doctest_imports(doctest_namespace) -> None: # pragma: no cover
2020
doctest_namespace["pd"] = pd # pragma: no cover
2121

2222

23-
@pytest.fixture(autouse=True, scope="module")
23+
@pytest.fixture(autouse=True, scope="session")
2424
def toggle_multiline_queries() -> None:
2525
pd.session._disable_multiline_queries()
2626
yield

tests/integ/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def test_schema(connection, local_testing_mode) -> None:
286286
cursor.execute(f"DROP SCHEMA IF EXISTS {TEST_SCHEMA}")
287287

288288

289-
@pytest.fixture(scope="module")
289+
@pytest.fixture(scope="session")
290290
def session(
291291
db_parameters,
292292
resources_path,
@@ -425,7 +425,7 @@ def temp_schema(connection, session, local_testing_mode) -> None:
425425
cursor.execute(f"DROP SCHEMA IF EXISTS {temp_schema_name}")
426426

427427

428-
@pytest.fixture(scope="module")
428+
@pytest.fixture(scope="session")
429429
def temp_stage(session, resources_path, local_testing_mode):
430430
tmp_stage_name = Utils.random_stage_name()
431431
test_files = TestFiles(resources_path)

tests/integ/modin/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def pytest_runtest_setup(item):
114114
pytest.skip(f"Skipped for Hybrid: {msg}")
115115

116116

117-
@pytest.fixture(scope="module", autouse=True)
117+
@pytest.fixture(scope="session", autouse=True)
118118
def f(session):
119119
# create a snowpark pandas dataframe so that modin keeps an empty query compiler
120120
pd.DataFrame()
@@ -371,7 +371,7 @@ def indices_dict():
371371
}
372372

373373

374-
@pytest.fixture(scope="module", autouse=True)
374+
@pytest.fixture(scope="session", autouse=True)
375375
def session(session):
376376
session._disable_multiline_queries()
377377
return session

tests/integ/modin/hybrid/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def enable_autoswitch():
2727
yield
2828

2929

30-
@pytest.fixture(scope="module")
31-
def init_transaction_tables():
30+
@pytest.fixture(scope="session")
31+
def init_transaction_tables(session):
3232
session = pd.session
3333
session.sql(
3434
"""

tests/integ/modin/test_apply_persist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def check_udf_exists(session, name):
5252
assert len(session.sql(f"SHOW USER FUNCTIONS LIKE '{name}'").collect()) > 0
5353

5454

55-
@pytest.fixture(scope="module")
55+
@pytest.fixture(scope="session")
5656
def stage_name(session):
5757
# Create a temporary stage for testing and clean it up after tests complete.
5858
stage_name = "test_apply_persist"

0 commit comments

Comments
 (0)