1import pytest
2
3import pandas._testing as tm
4
5from pandas.io.excel import ExcelWriter
6
7odf = pytest.importorskip("odf")
8
9pytestmark = pytest.mark.parametrize("ext", [".ods"])
10
11
12def test_write_append_mode_raises(ext):
13    msg = "Append mode is not supported with odf!"
14
15    with tm.ensure_clean(ext) as f:
16        with pytest.raises(ValueError, match=msg):
17            ExcelWriter(f, engine="odf", mode="a")
18