MacOS_Parsers/Parser_NEXT/tests/test_parser.py
2025-08-24 15:11:06 +03:00

10 lines
344 B
Python

from parser import parse_products_from_dom
from pathlib import Path
import yaml
def test_dom_parse_basic():
html = Path("tests/fixtures/category_sample.html").read_text(encoding="utf-8")
cfg = yaml.safe_load(Path("config.yaml").read_text(encoding="utf-8"))
lst = parse_products_from_dom(html, cfg)
assert isinstance(lst, list)