-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
10 deletions.
There are no files selected for viewing
12 changes: 2 additions & 10 deletions
12
libs/template/templates/default-python/template/{{.project_name}}/tests/main_test.py.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |