fonttools/Tests/feaLib/error_test.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
541 B
Python
Raw Permalink Normal View History

from fontTools.feaLib.error import FeatureLibError
from fontTools.feaLib.location import FeatureLibLocation
import unittest
class FeatureLibErrorTest(unittest.TestCase):
def test_str(self):
err = FeatureLibError("Squeak!", FeatureLibLocation("foo.fea", 23, 42))
self.assertEqual(str(err), "foo.fea:23:42: Squeak!")
def test_str_nolocation(self):
err = FeatureLibError("Squeak!", None)
self.assertEqual(str(err), "Squeak!")
if __name__ == "__main__":
import sys
2022-12-13 11:26:36 +00:00
sys.exit(unittest.main())