We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e21f733 commit c3d4e89Copy full SHA for c3d4e89
1 file changed
tests/test_general.py
@@ -2223,6 +2223,7 @@ def test_4928():
2223
2224
def test_4902():
2225
print()
2226
+ print(f'test_4902(): {pymupdf.mupdf_version_tuple=}')
2227
with pymupdf.open() as doc:
2228
page = doc.new_page()
2229
text = 'Hello World'
@@ -2241,5 +2242,9 @@ def test_4902():
2241
2242
with pymupdf.open('pdf', data) as doc:
2243
page = doc[0]
2244
spans = page.get_texttrace()
- for span in spans:
2245
- print(f'test_4902(): {span["linewidth"]=}, should be {bw*fontsize=}.')
+ for i, span in enumerate(spans):
2246
+ cs = ''.join([chr(cc[0]) for cc in span['chars']])
2247
+ print(f'test_4902(): {i=} {span["linewidth"]=} {cs=}')
2248
+ assert len(spans) == 2
2249
+ assert spans[0]['linewidth'] is None
2250
+ assert spans[1]['linewidth'] == 8.0
0 commit comments