Skip to content

Commit

Permalink
test: create test template
Browse files Browse the repository at this point in the history
  • Loading branch information
mamo3gr committed Dec 20, 2024
1 parent be75ddf commit 8fd96a3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/core/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1542,3 +1542,14 @@ class Schema(pa.DataFrameModel):
assert Schema.validate(df).equals( # type: ignore [attr-defined]
pd.DataFrame({"a": [1.0], "b": [1], "c": ["1"]})
)


def test_empty() -> None:
class Schema(pa.DataFrameModel):
a: Series[pa.Float]
b: Series[pa.Int]
c: Series[pa.String]
d: Series[pa.DateTime]

df = Schema.empty()
assert Schema.validate(df).empty

0 comments on commit 8fd96a3

Please sign in to comment.