-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new test to verify that coverage increases
- Loading branch information
1 parent
1f21c99
commit 038bb25
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2021 Adobe. All rights reserved. | ||
|
||
import os | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def fonts_dir(): | ||
root_dir = os.path.dirname(os.path.dirname(__file__)) | ||
yield os.path.join(root_dir, 'fonts') | ||
|
||
|
||
@pytest.fixture | ||
def base_font_path(fonts_dir): | ||
yield os.path.join(fonts_dir, 'Zebrawood.otf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2021 Adobe. All rights reserved. | ||
|
||
import pytest | ||
|
||
from opentypesvg.dumpsvg import main | ||
|
||
|
||
def test_font_without_svg_table(base_font_path, capsys): | ||
with pytest.raises(SystemExit): | ||
main([base_font_path]) | ||
captured = capsys.readouterr() | ||
assert captured.err == "ERROR: The font does not have the SVG table.\n" |