Skip to content

Commit

Permalink
#106: Linted
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Hoffmann <[email protected]>
  • Loading branch information
dh1542 committed Jan 28, 2025
1 parent 28cb5e0 commit e43cc4b
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ def test_gaussian_smoothing_temporal(spark_session: SparkSession):
original_values = df.select("Value").collect()
smoothed_values = result_df.select("Value").collect()

assert original_values != smoothed_values, "Values should be smoothed and not identical"
assert (
original_values != smoothed_values
), "Values should be smoothed and not identical"

assert result_df.count() == df.count(), "Result should have same number of rows"




def test_gaussian_smoothing_spatial(spark_session: SparkSession):
df = spark_session.createDataFrame(
[
Expand All @@ -89,9 +89,12 @@ def test_gaussian_smoothing_spatial(spark_session: SparkSession):
original_values = df.select("Value").collect()
smoothed_values = result_df.select("Value").collect()

assert original_values != smoothed_values, "Values should be smoothed and not identical"
assert (
original_values != smoothed_values
), "Values should be smoothed and not identical"
assert result_df.count() == df.count(), "Result should have same number of rows"


def test_interval_detection_large_data_set(spark_session: SparkSession):
# Should not timeout
base_path = os.path.dirname(__file__)
Expand All @@ -109,7 +112,9 @@ def test_interval_detection_large_data_set(spark_session: SparkSession):
)

actual_df = smoother.filter()
assert actual_df.count() == df.count(), "Output should have same number of rows as input"
assert (
actual_df.count() == df.count()
), "Output should have same number of rows as input"


def test_gaussian_smoothing_invalid_mode(spark_session: SparkSession):
Expand Down

0 comments on commit e43cc4b

Please sign in to comment.