10 lines
260 B
Python
10 lines
260 B
Python
from openocr_markdown.api import safe_stem
|
|
|
|
|
|
def test_safe_stem_keeps_simple_names() -> None:
|
|
assert safe_stem("invoice-01.png") == "invoice-01"
|
|
|
|
|
|
def test_safe_stem_replaces_unsafe_names() -> None:
|
|
assert safe_stem("../report 01!.pdf") == "report_01"
|