@@ -91,8 +91,8 @@ class TestLinkedWordHyphenation(unittest.TestCase):
|
||||
self.assertIsInstance(
|
||||
text_obj,
|
||||
LinkText,
|
||||
f"Hyphenated LinkedWord part should be LinkText, got {
|
||||
type(text_obj)}")
|
||||
f"Hyphenated LinkedWord part should be LinkText, got {type(text_obj)}"
|
||||
)
|
||||
self.assertEqual(text_obj.link.location, linked_word.location)
|
||||
|
||||
# The overflow should also be LinkText if it's hyphenated
|
||||
|
||||
@@ -381,8 +381,8 @@ class TestEPUBReader(unittest.TestCase):
|
||||
# Each chapter should start with a heading
|
||||
first_block = blocks[0]
|
||||
self.assertIsInstance(
|
||||
first_block, Heading, f"Chapter {
|
||||
i + 1} should start with heading")
|
||||
first_block, Heading, f"Chapter {i + 1} should start with heading"
|
||||
)
|
||||
|
||||
def test_epub_styled_content(self):
|
||||
"""Test that styled content in EPUB is properly parsed."""
|
||||
|
||||
@@ -51,8 +51,8 @@ class TestHTMLFileLoader(unittest.TestCase):
|
||||
self.assertIsInstance(
|
||||
block,
|
||||
Block,
|
||||
f"Item {i} should be a Block instance, got {
|
||||
type(block)}")
|
||||
f"Item {i} should be a Block instance, got {type(block)}"
|
||||
)
|
||||
|
||||
print(f"Successfully loaded and parsed HTML file with {len(blocks)} blocks")
|
||||
|
||||
|
||||
@@ -335,10 +335,8 @@ class TestDocumentLayouterIntegration:
|
||||
line = test_page.children[0]
|
||||
min_spacing, max_spacing = line._spacing
|
||||
|
||||
assert min_spacing == case["expected_min"], f"Min constraint failed for {
|
||||
case['name']}"
|
||||
assert max_spacing == case["expected_max"], f"Max constraint failed for {
|
||||
case['name']}"
|
||||
assert min_spacing == case["expected_min"], f"Min constraint failed for {case['name']}"
|
||||
assert max_spacing == case["expected_max"], f"Max constraint failed for {case['name']}"
|
||||
|
||||
print(f"✓ {case['name']}: constraints ({min_spacing}, {max_spacing})")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user