Skip to content

Commit 390eff3

Browse files
committed
refactor: add Pydantic support in table tests with conditional skip
1 parent 7cf5036 commit 390eff3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/test_table.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
from pydantic import BaseModel
88

99
import tppt
10-
from tppt._features import USE_PANDAS, USE_POLARS, Dataclass, PydanticModel
10+
from tppt._features import (
11+
USE_PANDAS,
12+
USE_POLARS,
13+
USE_PYDANTIC,
14+
Dataclass,
15+
PydanticModel,
16+
)
1117

1218

1319
def test_create_table_with_list_data(output: pathlib.Path) -> None:
@@ -185,6 +191,7 @@ class Employee:
185191
presentation.save(output / "table_dataclass_data.pptx")
186192

187193

194+
@pytest.mark.skipif(not USE_PYDANTIC, reason="Pydantic not installed")
188195
def test_create_table_with_pydantic_model(output: pathlib.Path) -> None:
189196
"""Test creating a table with Pydantic model."""
190197

0 commit comments

Comments
 (0)