Skip to content

Commit c3da5b3

Browse files
committed
fix: update config tests to include max_reported_failures field
- Added max_reported_failures field to expected dictionaries in test_pandas_config.py - Added max_reported_failures field to expected dictionaries in test_pyspark_config.py - Tests now properly account for the new config field introduced in the feature Signed-off-by: Shuntaro Takahashi <shushakura@gmail.com>
1 parent 6745d65 commit c3da5b3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

tests/pandas/test_pandas_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class TestSchema(DataFrameModel):
4848
"keep_cached_dataframe": False,
4949
"validation_enabled": False,
5050
"validation_depth": ValidationDepth.SCHEMA_AND_DATA,
51+
"max_reported_failures": 100,
5152
}
5253

5354
assert asdict(get_config_context()) == expected
@@ -68,6 +69,7 @@ def test_disable_validation(self):
6869
"keep_cached_dataframe": False,
6970
"validation_enabled": False,
7071
"validation_depth": ValidationDepth.SCHEMA_AND_DATA,
72+
"max_reported_failures": 100,
7173
}
7274
pandera_schema = SeriesSchema(
7375
int, pa.Check(lambda s: s.value_counts() == 2, element_wise=False)

tests/pyspark/test_pyspark_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class TestSchema(DataFrameModel):
4949
"validation_depth": ValidationDepth.SCHEMA_AND_DATA,
5050
"cache_dataframe": False,
5151
"keep_cached_dataframe": False,
52+
"max_reported_failures": 100,
5253
}
5354

5455
with config_context(validation_enabled=False):
@@ -71,6 +72,7 @@ def test_schema_only(self, spark_session, sample_spark_schema, request):
7172
"validation_depth": ValidationDepth.SCHEMA_ONLY,
7273
"cache_dataframe": False,
7374
"keep_cached_dataframe": False,
75+
"max_reported_failures": 100,
7476
}
7577
input_df = spark_df(spark, self.sample_data, sample_spark_schema)
7678

@@ -157,6 +159,7 @@ def test_data_only(self, spark_session, sample_spark_schema, request):
157159
"validation_depth": ValidationDepth.DATA_ONLY,
158160
"cache_dataframe": False,
159161
"keep_cached_dataframe": False,
162+
"max_reported_failures": 100,
160163
}
161164

162165
input_df = spark_df(spark, self.sample_data, sample_spark_schema)
@@ -252,6 +255,7 @@ def test_schema_and_data(
252255
"validation_depth": ValidationDepth.SCHEMA_AND_DATA,
253256
"cache_dataframe": False,
254257
"keep_cached_dataframe": False,
258+
"max_reported_failures": 100,
255259
}
256260

257261
input_df = spark_df(spark, self.sample_data, sample_spark_schema)
@@ -379,6 +383,7 @@ def test_cache_dataframe_settings(
379383
"validation_depth": ValidationDepth.SCHEMA_AND_DATA,
380384
"cache_dataframe": cache_dataframe,
381385
"keep_cached_dataframe": keep_cached_dataframe,
386+
"max_reported_failures": 100,
382387
}
383388
with config_context(
384389
cache_dataframe=cache_dataframe,

0 commit comments

Comments
 (0)