Vik Paruchuri commited on
Commit
1390b9d
·
1 Parent(s): 721ca55

Add test for empty char list

Browse files
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
  [tool.poetry]
2
  name = "marker-pdf"
3
- version = "1.7.2"
4
  description = "Convert documents to markdown with high speed and accuracy."
5
  authors = ["Vik Paruchuri <github@vikas.sh>"]
6
  readme = "README.md"
 
1
  [tool.poetry]
2
  name = "marker-pdf"
3
+ version = "1.7.3"
4
  description = "Convert documents to markdown with high speed and accuracy."
5
  authors = ["Vik Paruchuri <github@vikas.sh>"]
6
  readme = "README.md"
tests/builders/test_ocr_builder.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+
3
+ from marker.builders.ocr import OcrBuilder
4
+
5
+
6
+ def test_blank_char_builder(recognition_model):
7
+ builder = OcrBuilder(recognition_model)
8
+ image = Image.new("RGB", (100, 100))
9
+ spans = builder.spans_from_html_chars([], None, image) # Test with empty char list
10
+ assert len(spans) == 0