Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate tests appropriately #1551

Merged
merged 4 commits into from
Jan 14, 2023
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
5 changes: 5 additions & 0 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def test_get_outline(src, outline_elements):
assert len(outline) == outline_elements


@pytest.mark.samples
@pytest.mark.parametrize(
("src", "expected_images"),
[
Expand Down Expand Up @@ -866,6 +867,7 @@ def test_get_fields():
assert dict(fields["c1-1"]) == ({"/FT": "/Btn", "/T": "c1-1"})


@pytest.mark.external
def test_get_full_qualified_fields():
url = "https:/py-pdf/PyPDF2/files/10142389/fields_with_dots.pdf"
name = "fields_with_dots.pdf"
Expand Down Expand Up @@ -1214,6 +1216,7 @@ def test_zeroing_xref():
len(reader.pages)


@pytest.mark.external
def test_thread():
url = "https:/py-pdf/pypdf/files/9066120/UTA_OSHA_3115_Fall_Protection_Training_09162021_.pdf"
name = "UTA_OSHA.pdf"
Expand All @@ -1226,6 +1229,7 @@ def test_thread():
assert len(reader.threads) >= 1


@pytest.mark.external
def test_build_outline_item(caplog):
url = "https:/py-pdf/pypdf/files/9464742/shiv_resume.pdf"
name = "shiv_resume.pdf"
Expand Down Expand Up @@ -1253,6 +1257,7 @@ def test_build_outline_item(caplog):
assert "Unexpected destination 2" in exc.value.args[0]


@pytest.mark.samples
@pytest.mark.parametrize(
("src", "page_labels"),
[
Expand Down
4 changes: 4 additions & 0 deletions tests/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,7 @@ def test_startup_dest():
pdf_file_writer.open_destination = None


@pytest.mark.external
def test_iss471():
url = "https:/py-pdf/pypdf/files/9139245/book.pdf"
name = "book_471.pdf"
Expand All @@ -942,6 +943,7 @@ def test_iss471():
)


@pytest.mark.external
def test_reset_translation():
url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924666.pdf"
name = "tika-924666.pdf"
Expand Down Expand Up @@ -977,6 +979,7 @@ def test_threads_empty():
assert thr == thr2


@pytest.mark.external
def test_append_without_annots_and_articles():
url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924666.pdf"
name = "tika-924666.pdf"
Expand All @@ -993,6 +996,7 @@ def test_append_without_annots_and_articles():
assert len(writer.threads) >= 1


@pytest.mark.external
def test_append_multiple():
url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924666.pdf"
name = "tika-924666.pdf"
Expand Down