Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions python/tests/test_rustlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,13 @@ def test_serialize():
assert rl.serialize(dom.root(), 0, is_html=False) == b"<hello>Ali</hello>"


def test_class_modules():
classes = [value for value in vars(rl).values() if isinstance(value, type)]
assert rl.HtmlOptions in classes

for cls in classes:
assert cls.__module__ == "markupever._rustlib", cls

def test_iter_submodule():
import markupever._rustlib.iter

Expand Down
4 changes: 2 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
///
/// # Note
/// this type is immutable.
#[pyo3::pyclass(name = "HtmlOptions", module = "markupselect._rustlib", frozen)]
#[pyo3::pyclass(name = "HtmlOptions", module = "markupever._rustlib", frozen)]
pub struct PyHtmlOptions {
exact_errors: bool,
discard_bom: bool,
Expand Down Expand Up @@ -139,7 +139,7 @@ impl PyHtmlOptions {
}
}

#[pyo3::pyclass(name = "XmlOptions", module = "markupselect._rustlib", frozen)]
#[pyo3::pyclass(name = "XmlOptions", module = "markupever._rustlib", frozen)]
pub struct PyXmlOptions {
exact_errors: bool,
discard_bom: bool,
Expand Down
Loading