Skip to content

Commit

Permalink
Add a new test to verify that coverage increases
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsousa committed May 8, 2021
1 parent 1f21c99 commit 038bb25
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/conftest.py
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')
12 changes: 12 additions & 0 deletions tests/dumpsvg_test.py
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"

0 comments on commit 038bb25

Please sign in to comment.