Skip to content

Commit 038bb25

Browse files
committed
Add a new test to verify that coverage increases
1 parent 1f21c99 commit 038bb25

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/conftest.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2021 Adobe. All rights reserved.
2+
3+
import os
4+
import pytest
5+
6+
7+
@pytest.fixture
8+
def fonts_dir():
9+
root_dir = os.path.dirname(os.path.dirname(__file__))
10+
yield os.path.join(root_dir, 'fonts')
11+
12+
13+
@pytest.fixture
14+
def base_font_path(fonts_dir):
15+
yield os.path.join(fonts_dir, 'Zebrawood.otf')

tests/dumpsvg_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2021 Adobe. All rights reserved.
2+
3+
import pytest
4+
5+
from opentypesvg.dumpsvg import main
6+
7+
8+
def test_font_without_svg_table(base_font_path, capsys):
9+
with pytest.raises(SystemExit):
10+
main([base_font_path])
11+
captured = capsys.readouterr()
12+
assert captured.err == "ERROR: The font does not have the SVG table.\n"

0 commit comments

Comments
 (0)