Skip to content

Commit

Permalink
Test empty documentclass
Browse files Browse the repository at this point in the history
  • Loading branch information
voidstarstar committed May 12, 2024
1 parent 3f7bb13 commit 447379b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/matplotlib/tests/test_backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,20 @@ def test_preamble_packages(format, tmp_path):
path = os.path.join(tmp_path, f'preamble_packages_{format}.pdf')
with PdfPages(path) as pdf:
pdf.savefig(plt.figure())


# test different documentclass types
@needs_pgf_xelatex
@pytest.mark.parametrize('documentclass', (
'',
r'\documentclass{article}',
r'\documentclass[12]{article}',
r'\documentclass[10]{article}',
r'\documentclass[20]{extarticle}',
r'\documentclass{minimal}',
r'\documentclass{beamer}',
))
@pytest.mark.backend('pgf')
def test_documentclass(documentclass):
mpl.rcParams['pgf.documentclass'] = documentclass
plt.figure().savefig(BytesIO())

0 comments on commit 447379b

Please sign in to comment.