Home | History | Annotate | Download | only in feaLib
      1 from __future__ import print_function, division, absolute_import
      2 from __future__ import unicode_literals
      3 from fontTools.feaLib.error import FeatureLibError
      4 import unittest
      5 
      6 
      7 class FeatureLibErrorTest(unittest.TestCase):
      8     def test_str(self):
      9         err = FeatureLibError("Squeak!", ("foo.fea", 23, 42))
     10         self.assertEqual(str(err), "foo.fea:23:42: Squeak!")
     11 
     12     def test_str_nolocation(self):
     13         err = FeatureLibError("Squeak!", None)
     14         self.assertEqual(str(err), "Squeak!")
     15 
     16 
     17 if __name__ == "__main__":
     18     import sys
     19     sys.exit(unittest.main())
     20