@@ -395,7 +395,7 @@ class TestEPUBReader(unittest.TestCase):
|
||||
styled_words_found = False
|
||||
for block in chapter2_blocks:
|
||||
if isinstance(block, Paragraph):
|
||||
words = list(block.words())
|
||||
words = list(block.words_iter())
|
||||
for _, word in words:
|
||||
if (word.style.weight == FontWeight.BOLD or
|
||||
word.style.style == FontStyle.ITALIC or
|
||||
@@ -717,7 +717,7 @@ class TestEPUBIntegrationWithHTMLExtraction(unittest.TestCase):
|
||||
styled_content_found = False
|
||||
for block in blocks:
|
||||
if isinstance(block, Paragraph):
|
||||
words = list(block.words())
|
||||
words = list(block.words_iter())
|
||||
for _, word in words:
|
||||
if (word.style.weight == FontWeight.BOLD or
|
||||
word.style.style == FontStyle.ITALIC or
|
||||
@@ -738,7 +738,7 @@ class TestEPUBIntegrationWithHTMLExtraction(unittest.TestCase):
|
||||
for block in blocks:
|
||||
if isinstance(block, (Paragraph, Table)):
|
||||
if isinstance(block, Paragraph):
|
||||
words = list(block.words())
|
||||
words = list(block.words_iter())
|
||||
for _, word in words:
|
||||
if word.style.colour == (255, 0, 0): # Red
|
||||
red_text_found = True
|
||||
|
||||
Reference in New Issue
Block a user