diff --git a/ruff.toml b/ruff.toml index a4cb9a1..aa89757 100644 --- a/ruff.toml +++ b/ruff.toml @@ -72,6 +72,9 @@ ignore = [ # Too many statements "PLR0915", + # Too many arguments + "PLR0917", + # TBD: Enable: Use `sys.exit()` instead of `exit` "PLR1722", diff --git a/tests/integration/20_fuzz_integration/test.itest b/tests/integration/20_fuzz_integration/test.itest index 850f444..4da182f 100644 --- a/tests/integration/20_fuzz_integration/test.itest +++ b/tests/integration/20_fuzz_integration/test.itest @@ -4,6 +4,6 @@ RUN: mkdir -p %project_root/build/tests_integration_fuzz/ RUN: cp -rv %project_root/tests/fuzz/01_strictdoc_guide_202510 %project_root/build/tests_integration_fuzz/ -RUN: PYTHONPATH=%project_root python -m html2pdf4doc.main_fuzzer %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510/strictdoc/docs/strictdoc_01_user_guide-PDF.html %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510 %T/ --total-mutations 1 --mutations=random | filecheck %s --dump-input=fail -RUN: PYTHONPATH=%project_root python -m html2pdf4doc.main_fuzzer %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510/strictdoc/docs/strictdoc_01_user_guide-PDF.html %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510 %T/ --total-mutations 1 --mutations=incremental | filecheck %s --dump-input=fail +RUN: python -m html2pdf4doc.main_fuzzer %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510/strictdoc/docs/strictdoc_01_user_guide-PDF.html %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510 %T/ --total-mutations 1 --mutations=random | filecheck %s --dump-input=fail +RUN: python -m html2pdf4doc.main_fuzzer %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510/strictdoc/docs/strictdoc_01_user_guide-PDF.html %project_root/build/tests_integration_fuzz/01_strictdoc_guide_202510 %T/ --total-mutations 1 --mutations=incremental | filecheck %s --dump-input=fail CHECK: html2pdf4doc_fuzzer: finished ✅ — Success rate: 1/1 (100.0%) diff --git a/tests/integration/40_sdoc_only_child_does_not_break_page_when_surrounded_by_text_nodes/test.py b/tests/integration/40_sdoc_only_child_does_not_break_page_when_surrounded_by_text_nodes/test.py index 0730dd3..2ee147d 100644 --- a/tests/integration/40_sdoc_only_child_does_not_break_page_when_surrounded_by_text_nodes/test.py +++ b/tests/integration/40_sdoc_only_child_does_not_break_page_when_surrounded_by_text_nodes/test.py @@ -14,7 +14,10 @@ # page2_text_normalized = ( - reader.pages[2].extract_text().replace("leo.StrictDoc", "leo.\nStrictDoc") + reader.pages[2] + .extract_text() + .replace("leo.StrictDoc", "leo.\nStrictDoc") + .replace("3 / 4", "3/4") ) assert ( page2_text_normalized @@ -28,7 +31,10 @@ ), page2_text_normalized page3_text_normalized = ( - reader.pages[3].extract_text().replace("cStrictDoc", "c\nStrictDoc") + reader.pages[3] + .extract_text() + .replace("cStrictDoc", "c\nStrictDoc") + .replace("4 / 4", "4/4") ) assert ( diff --git a/tests/integration/lit.cfg.py b/tests/integration/lit.cfg.py index dd7d730..bbf02fb 100644 --- a/tests/integration/lit.cfg.py +++ b/tests/integration/lit.cfg.py @@ -7,7 +7,7 @@ lit_config: Any config.name = "html2pdf4doc Python API integration tests" -config.test_format = lit.formats.ShTest("0") +config.test_format = lit.formats.ShTest() current_dir = os.getcwd().replace("\\", "/")