From 8fd96a3244788bc6df61ffb2ab9097b1e4c2ba21 Mon Sep 17 00:00:00 2001 From: Mamoru Miura Date: Fri, 20 Dec 2024 16:07:27 +0900 Subject: [PATCH] test: create test template --- tests/core/test_model.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/core/test_model.py b/tests/core/test_model.py index 36b29c416..75785e1f3 100644 --- a/tests/core/test_model.py +++ b/tests/core/test_model.py @@ -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