Commit f5a56bf1 authored by myhloli's avatar myhloli
Browse files

fix(test_table): update image path to use relative path

- Replace hardcoded image path with dynamic path generation
- Use os.path.join to create platform-independent file paths
- Improve code maintainability and portability across different environments
parent 78d11172
import unittest
import os
from PIL import Image
from lxml import etree
......@@ -8,7 +9,7 @@ from magic_pdf.model.sub_modules.table.rapidtable.rapid_table import RapidTableM
class TestppTableModel(unittest.TestCase):
def test_image2html(self):
img = Image.open("assets/table.jpg")
img = Image.open(os.path.join(os.path.dirname(__file__), "assets/table.jpg"))
atom_model_manager = AtomModelSingleton()
ocr_engine = atom_model_manager.get_atom_model(
atom_model_name='ocr',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment