summaryrefslogtreecommitdiff
path: root/tests/test_basic_api.py
diff options
context:
space:
mode:
authorthatch <devnull@localhost>2008-08-14 23:39:04 -0700
committerthatch <devnull@localhost>2008-08-14 23:39:04 -0700
commit424366452ddc8619e89d3580aefb59e2bfae26b0 (patch)
tree5e6ebe5fc05e5b573c6e5154bd96621f693025e2 /tests/test_basic_api.py
parente6e3faecd77f18ba8977ea1f8832578d683f5930 (diff)
parent3e1d51e070744961d57aba8b7b2110e3ecaddacf (diff)
downloadpygments-424366452ddc8619e89d3580aefb59e2bfae26b0.tar.gz
Merge Scala support from Krzysiek Goj's branch
Diffstat (limited to 'tests/test_basic_api.py')
-rw-r--r--tests/test_basic_api.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index ab348cbc..50dbd943 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -15,6 +15,7 @@ import random
from pygments import lexers, formatters, filters, format
from pygments.token import _TokenType, Text
from pygments.lexer import RegexLexer
+from pygments.formatters.img import FontNotFound
test_content = [chr(i) for i in xrange(33, 128)] * 5
random.shuffle(test_content)
@@ -133,7 +134,7 @@ class FormattersTest(unittest.TestCase):
try:
inst = formatter(opt1="val1")
- except ImportError:
+ except (ImportError, FontNotFound):
continue
inst.get_style_defs()
inst.format(ts, out)
@@ -168,8 +169,8 @@ class FormattersTest(unittest.TestCase):
for formatter, info in formatters.FORMATTERS.iteritems():
try:
inst = formatter(encoding=None)
- except ImportError:
- # some dependency not installed
+ except (ImportError, FontNotFound):
+ # some dependency or font not installed
continue
out = format(tokens, inst)
if formatter.unicodeoutput: