diff --git a/Makefile b/Makefile index 3c8a703..8252772 100644 --- a/Makefile +++ b/Makefile @@ -13,4 +13,4 @@ check_format: . .venv/bin/activate; command black --line-length 125 . --check test: - . .venv/bin/activate; command cd src; python -m unittest test/test_trainer.py + . .venv/bin/activate; command cd src; python -m pytest diff --git a/src/pdf_token_type_labels/TokenType.py b/src/pdf_token_type_labels/TokenType.py index 0587680..2ef70f4 100644 --- a/src/pdf_token_type_labels/TokenType.py +++ b/src/pdf_token_type_labels/TokenType.py @@ -4,15 +4,15 @@ class TokenType(Enum): FORMULA = "Formula" FOOTNOTE = "Footnote" - LIST_ITEM = "ListItem" + LIST_ITEM = "List item" TABLE = "Table" PICTURE = "Picture" TITLE = "Title" TEXT = "Text" - PAGE_HEADER = "PageHeader" - SECTION_HEADER = "SectionHeader" + PAGE_HEADER = "Page header" + SECTION_HEADER = "Section header" CAPTION = "Caption" - PAGE_FOOTER = "PageFooter" + PAGE_FOOTER = "Page footer" @staticmethod def from_text(text: str): diff --git a/src/test/test_pdf_features.py b/src/test/test_pdf_features.py index 87004ce..f6cb9a6 100644 --- a/src/test/test_pdf_features.py +++ b/src/test/test_pdf_features.py @@ -14,8 +14,8 @@ def test_wrong_pdf(self): def test_blank_xml(self): pdf_features_empty = PdfFeatures.from_poppler_etree_content("", "") pdf_features_empty_list = PdfFeatures.from_poppler_etree_content("", "[]") - self.assertNotEquals(pdf_features_empty, None) - self.assertNotEquals(pdf_features_empty_list, None) + self.assertNotEqual(pdf_features_empty, None) + self.assertNotEqual(pdf_features_empty_list, None) def test_ocr_pdf(self): current_directory = Path(__file__).parent.resolve()