Skip to content

⚙ pre-commit: Update hooks #53

⚙ pre-commit: Update hooks

⚙ pre-commit: Update hooks #53

GitHub Actions / Results on Python 3.12 failed Jan 2, 2024 in 0s

Results on Python 3.12 ❌

Tests failed

❌ test-results-3.12/junit.xml

70 tests were completed in 3s with 68 passed, 1 failed and 1 skipped.

Test suite Passed Failed Skipped Time
pytest 68✅ 1❌ 1⚪ 3s

❌ pytest

src.dinglehopper.tests.extracted_text_test
  ✅ test_text
  ✅ test_normalization_check
  ✅ test_align
  ✅ test_textequiv[attributes0-None-None]
  ✅ test_textequiv[attributes1-0-None]
  ✅ test_textequiv[attributes2-0-None]
  ✅ test_textequiv[attributes3-0-None]
  ✅ test_textequiv[attributes4-1-None]
  ✅ test_textequiv[attributes5-0-TextEquiv without index]
  ✅ test_textequiv[attributes6-2-No index attributes, use 'conf' attribute to sort TextEquiv]
  ✅ test_textequiv[attributes7-0-TextEquiv without index]
  ✅ test_textequiv[attributes8-1-No index attributes, use 'conf' attribute to sort TextEquiv]
  ✅ test_textequiv[attributes9-0-No index attributes, use first TextEquiv]
src.dinglehopper.tests.test_align
  ✅ test_left_empty
  ✅ test_right_empty
  ✅ test_left_longer
  ✅ test_right_longer
  ✅ test_some_diff
  ✅ test_longer
  ✅ test_completely_different
  ✅ test_with_some_fake_ocr_errors
  ✅ test_lines
  ⚪ test_lines_similar
  ✅ test_score_hint
src.dinglehopper.tests.test_character_error_rate
  ✅ test_character_error_rate
  ✅ test_character_error_rate_hard
src.dinglehopper.tests.test_edit_distance
  ✅ test_distance
src.dinglehopper.tests.test_editops
  ✅ test_editops
  ✅ test_editops_canonically_equivalent
src.dinglehopper.tests.test_integ_align
  ✅ test_align_page_files
src.dinglehopper.tests.test_integ_bigger_texts
  ✅ test_bigger_texts
src.dinglehopper.tests.test_integ_character_error_rate_ocr
  ✅ test_character_error_rate_between_page_files
  ✅ test_character_error_rate_between_page_alto
  ✅ test_character_error_rate_between_page_alto_2
src.dinglehopper.tests.test_integ_cli_dir
  ✅ test_cli_directory
  ✅ test_cli_fail_without_gt
src.dinglehopper.tests.test_integ_cli_valid_json
  ✅ test_cli_json
  ✅ test_cli_json_cer_is_infinity
src.dinglehopper.tests.test_integ_differences
  ❌ test_cli_differences
	tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_cli_differences0')
src.dinglehopper.tests.test_integ_edit_distance_ocr
  ✅ test_distance_between_page_files
  ✅ test_distance_between_page_alto
  ✅ test_distance_between_page_alto_2
src.dinglehopper.tests.test_integ_ocrd_cli
  ✅ test_ocrd_cli
src.dinglehopper.tests.test_integ_summarize
  ✅ test_cli_summarize_json
  ✅ test_cli_summarize_html
  ✅ test_cli_summarize_html_skip_invalid
src.dinglehopper.tests.test_integ_table_extraction
  ✅ test_reading_order_settings[table-order-0001.xml-1\n2\n3\n4\n5\n6\n7\n8\n9]
  ✅ test_reading_order_settings[table-order-0002.xml-1\n4\n7\n2\n5\n8\n3\n6\n9]
  ✅ test_reading_order_settings[table-region.xml-1\n2\n3\n4\n5\n6\n7\n8\n9]
  ✅ test_reading_order_settings[table-no-reading-order.xml-5\n6\n7\n8\n9\n1\n2\n3\n4]
  ✅ test_reading_order_settings[table-unordered.xml-1\n2\n3\n4\n5\n6\n7\n8\n9]
src.dinglehopper.tests.test_integ_word_error_rate_ocr
  ✅ test_word_error_rate_between_page_files
  ✅ test_word_error_rate_between_page_alto
  ✅ test_word_error_rate_between_page_alto_2
src.dinglehopper.tests.test_ocr_files
  ✅ test_alto_namespace
  ✅ test_alto_text
  ✅ test_alto_text_ALTO1
  ✅ test_alto_text_ALTO2
  ✅ test_alto_text_ALTO3
  ✅ test_page_namespace
  ✅ test_page_test
  ✅ test_page_with_empty_region
  ✅ test_page_order
  ✅ test_page_mixed_regions
  ✅ test_page_level
  ✅ test_text
  ✅ test_plain
src.dinglehopper.tests.test_word_error_rate
  ✅ test_words
  ✅ test_words_private_use_area
  ✅ test_word_error_rate

Annotations

Check failure on line 0 in test-results-3.12/junit.xml

See this annotation in the file changed.

@github-actions github-actions / Results on Python 3.12

pytest ► src.dinglehopper.tests.test_integ_differences ► test_cli_differences

Failed test found in:
  test-results-3.12/junit.xml
Error:
  tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_cli_differences0')
Raw output
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_cli_differences0')

    @pytest.mark.integration
    def test_cli_differences(tmp_path):
        """Test that the cli/process() yields a JSON report that includes
        the differences found between the GT and OCR text"""
    
        initLogging()
        process(
            os.path.join(data_dir, "test-gt.page2018.xml"),
            os.path.join(data_dir, "test-fake-ocr.page2018.xml"),
            "report",
            tmp_path,
            differences=True,
        )
    
        assert os.path.exists(tmp_path / "report.json")
    
        with open(tmp_path / "report.json", "r") as jsonf:
            j = json.load(jsonf)
    
>           assert j["differences"] == {
                "character_level": {"n :: m": 1, "ſ :: f": 1},
                "word_level": {
                    "Augenblick :: Augemblick": 1,
                    "Verſprochene :: Verfprochene": 1,
                },
            }
E           AssertionError: assert {'character_l...rd_level': {}} == {'character_l...prochene': 1}}
E             Omitting 1 identical items, use -vv to show
E             Differing items:
E             {'word_level': {}} != {'word_level': {'Augenblick :: Augemblick': 1, 'Verſprochene :: Verfprochene': 1}}
E             Full diff:
E               {
E                'character_level': {'n :: m': 1,
E                                    'ſ :: f': 1},
E             +  'word_level': {},
E             -  'word_level': {'Augenblick :: Augemblick': 1,
E             -                 'Verſprochene :: Verfprochene': 1},
E               }

dinglehopper/tests/test_integ_differences.py:31: AssertionError