diff --git a/.coverage b/.coverage index 4424185..71473d2 100644 Binary files a/.coverage and b/.coverage differ diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 4bc0627..5028607 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -75,7 +75,7 @@ jobs: - name: Install test dependencies run: | - pip install pytest defusedxml + pip install pytest pytest-cov defusedxml xmltodict pip install -e . - name: Verify import diff --git a/Makefile b/Makefile index bd98e2e..f9dbfd9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean clean-test clean-pyc clean-build docs help +.PHONY: clean clean-test clean-pyc clean-build docs help test-rust test-all .DEFAULT_GOAL := help define BROWSER_PYSCRIPT @@ -60,11 +60,16 @@ typecheck: ## check types with ty uvx ty check json2xml tests test: ## run tests quickly with the default Python - pytest --cov=json2xml --cov-report=xml:coverage/reports/coverage.xml --cov-report=term -xvs tests -n auto + pytest --cov=json2xml --cov-report=xml:coverage/reports/coverage.xml --cov-report=term -xvs tests test-simple: ## run tests without coverage pytest -vv tests +test-rust: ## run Rust tests + cd rust && cargo test --no-default-features + +test-all: test test-rust ## run all tests (Python and Rust) + check-all: lint typecheck test ## run all checks (lint, typecheck, test) coverage: ## check code coverage quickly with the default Python diff --git a/docs/requirements.in b/docs/requirements.in index ab01b52..08bba10 100644 --- a/docs/requirements.in +++ b/docs/requirements.in @@ -8,7 +8,7 @@ sphinx-autodoc-typehints==3.6.0 mock==5.2.0 autodoc==0.5.0 -tornado==6.5.4 +tornado==6.5.5 jinja2==3.1.6 idna==3.11 starlette==0.50.0 diff --git a/docs/requirements.txt b/docs/requirements.txt index af71f7e..cd00801 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -99,7 +99,7 @@ starlette==0.50.0 # via # -r requirements.in # sphinx-autobuild -tornado==6.5.4 +tornado==6.5.5 # via -r requirements.in typing-extensions==4.12.2 # via beautifulsoup4 diff --git a/tests/test_rust_dicttoxml.py b/tests/test_rust_dicttoxml.py index cdb469a..6efbcef 100644 --- a/tests/test_rust_dicttoxml.py +++ b/tests/test_rust_dicttoxml.py @@ -6,6 +6,8 @@ """ from __future__ import annotations +from typing import Any + import pytest # Check if Rust extension is available @@ -494,8 +496,8 @@ def test_large_list(self): def test_deeply_nested_structure(self): """Ensure deep nesting doesn't crash.""" - data = {"level": None} - current = data + data: dict[str, Any] = {"level": None} + current: dict[str, Any] = data for i in range(50): current["level"] = {"value": i} current = current["level"] diff --git a/uv.lock b/uv.lock index fd0547b..90f088e 100644 --- a/uv.lock +++ b/uv.lock @@ -147,7 +147,7 @@ wheels = [ [[package]] name = "json2xml" -version = "6.0.3" +version = "6.0.4" source = { editable = "." } dependencies = [ { name = "defusedxml" },