diff --git a/Lib/fontTools/ttLib/woff2_test.py b/Lib/fontTools/ttLib/woff2_test.py index 8746eba5d..93bc3ae97 100644 --- a/Lib/fontTools/ttLib/woff2_test.py +++ b/Lib/fontTools/ttLib/woff2_test.py @@ -79,7 +79,7 @@ class WOFF2ReaderTest(unittest.TestCase): header = sstruct.unpack(woff2DirectoryFormat, data) header['totalCompressedSize'] = 0 data = sstruct.pack(woff2DirectoryFormat, header) - with self.assertRaises(brotli.error): + with self.assertRaises((brotli.error, ttLib.TTLibError)): WOFF2Reader(BytesIO(data + self.file.read())) def test_incorrect_uncompressed_size(self):