From 289839b3c01661e4908dfc84acec9a6fda9c4cde Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 5 Mar 2024 13:14:15 +0100 Subject: [PATCH] remove fixture --- .../{{.project_name}}/tests/main_test.py.tmpl | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/template/templates/default-python/template/{{.project_name}}/tests/main_test.py.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/tests/main_test.py.tmpl index f4480bc47d..26d20ad4ff 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/tests/main_test.py.tmpl +++ b/libs/template/templates/default-python/template/{{.project_name}}/tests/main_test.py.tmpl @@ -1,15 +1,7 @@ from pyspark.sql import SparkSession -from pytest import fixture from {{.project_name}}.main import get_taxis, get_spark -@fixture(scope="session") -def spark() -> SparkSession: - spark = get_spark() - yield spark - spark.stop() - - -def test_main(spark: SparkSession): - taxis = get_taxis(spark) +def test_main(): + taxis = get_taxis(get_spark()) assert taxis.count() > 5