Skip to content

Commit b708747

Browse files
committed
moved fixture to conftest
1 parent 7757e05 commit b708747

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

tests/integration/conftest.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import logging
23

34
from pytest import fixture
@@ -12,9 +13,16 @@
1213

1314
@fixture
1415
def debug_env_name():
15-
return "ucws"
16+
return "ws"
1617

1718

1819
@fixture
1920
def product_info():
2021
return 'pytester', __version__
22+
23+
24+
@fixture
25+
def serverless_env():
26+
os.environ['DATABRICKS_SERVERLESS_COMPUTE_ID'] = 'auto'
27+
yield
28+
os.environ.pop('DATABRICKS_SERVERLESS_COMPUTE_ID')

tests/integration/fixtures/test_connect.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import os
2-
from pytest import fixture
31
from databricks.connect import DatabricksSession
42

53

@@ -36,13 +34,6 @@ def test_databricks_connect_serverless_set_cluster_id(serverless_env, ws, reques
3634
assert not creator # serverless clusters don't have assigned creator
3735

3836

39-
@fixture
40-
def serverless_env():
41-
os.environ['DATABRICKS_SERVERLESS_COMPUTE_ID'] = 'auto'
42-
yield
43-
os.environ.pop('DATABRICKS_SERVERLESS_COMPUTE_ID')
44-
45-
4637
def get_cluster_creator(spark, ws):
4738
"""
4839
Get the creator of the cluster that the Spark session is connected to.

0 commit comments

Comments
 (0)