This commit is contained in:
Kovid Goyal
2024-12-09 21:22:41 +05:30
parent 1784823c18
commit 1aec299ad8
2 changed files with 7 additions and 2 deletions

View File

@@ -166,7 +166,7 @@ def create_narrow_symbols(opts: Options) -> tuple[tuple[int, int, int], ...]:
descriptor_overrides: dict[int, tuple[str, bool, bool]] = {}
def descriptor_for_idx(idx: int) -> tuple[Union[FontObject | str], bool, bool]:
def descriptor_for_idx(idx: int) -> tuple[Union[FontObject, str], bool, bool]:
ans = descriptor_overrides.get(idx)
if ans is None:
return current_faces[idx]

View File

@@ -235,7 +235,12 @@ def block_helpers(s, sprites, cell_width, cell_height):
return ans
def block_test(*expected, **kw):
for i, (expected, actual) in enumerate(zip(expected, multiline_render(kw.pop('text', ''), **kw), strict=True)):
mr = multiline_render(kw.pop('text', ''), **kw)
try:
z = zip(expected, mr, strict=True)
except TypeError:
z = zip(expected, mr)
for i, (expected, actual) in enumerate(z):
assert_blocks(expected(), actual, f'Block {i} is not equal')