diff --git a/kitty/core_text.m b/kitty/core_text.m index 46c4e99e5..764feb109 100644 --- a/kitty/core_text.m +++ b/kitty/core_text.m @@ -185,7 +185,7 @@ new(PyTypeObject *type, PyObject *args, PyObject UNUSED *kwds) { } else Py_CLEAR(self); } else { Py_CLEAR(self); - PyErr_NoMemory(); + if (!PyErr_Occurred()) PyErr_NoMemory(); } } return (PyObject*)self; diff --git a/kitty_tests/fonts.py b/kitty_tests/fonts.py index c89318527..c43678216 100644 --- a/kitty_tests/fonts.py +++ b/kitty_tests/fonts.py @@ -3,11 +3,13 @@ # License: GPL v3 Copyright: 2017, Kovid Goyal from collections import OrderedDict +import unittest from kitty.fast_data_types import ( set_send_sprite_to_gpu, sprite_map_set_layout, sprite_map_set_limits, test_render_line, test_sprite_position_for ) +from kitty.constants import isosx from kitty.fonts.box_drawing import box_chars from kitty.fonts.render import render_string, set_font_family @@ -52,6 +54,7 @@ class Rendering(BaseTest): test_render_line(line) self.assertEqual(len(self.sprites), prerendered + len(box_chars)) + @unittest.skipIf(isosx, 'macOS is too underpowered') def test_rendering(self): text = 'He\u0347\u0305llo\u0341, w\u0302or\u0306l\u0354d!' cells = render_string(text)[-1]