summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch
diff options
context:
space:
mode:
authorEfraim Flashner <[email protected]>2023-01-30 11:33:18 +0200
committerEfraim Flashner <[email protected]>2023-01-30 12:39:40 +0200
commit4cf1acc7f3033b50b0bf19e02c9f522d522d338c (patch)
tree9fd64956ee60304c15387eb394cd649e49f01467 /gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch
parentedb8c09addd186d9538d43b12af74d6c7aeea082 (diff)
parent595b53b74e3ef57a1c0c96108ba86d38a170a241 (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm
Diffstat (limited to 'gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch')
-rw-r--r--gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch96
1 files changed, 96 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch b/gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch
new file mode 100644
index 0000000000..14f1f73924
--- /dev/null
+++ b/gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch
@@ -0,0 +1,96 @@
+Origin: https://github.com/py-pdf/pypdf/commit/767047b98ee3ea7aca331cfbd63502a284bfed93
+From 767047b98ee3ea7aca331cfbd63502a284bfed93 Mon Sep 17 00:00:00 2001
+From: dkg <[email protected]>
+Date: Sat, 14 Jan 2023 03:32:45 -0500
+Subject: [PATCH 03/14] Annotate tests appropriately (#1551)
+
+By annotating these tests, we can use pytest markers to skip external
+tests and tests that depend on sample-files.
+---
+ tests/test_reader.py | 5 +++++
+ tests/test_writer.py | 4 ++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/tests/test_reader.py b/tests/test_reader.py
+index 710e6c5..62eb7b7 100644
+--- a/tests/test_reader.py
++++ b/tests/test_reader.py
+@@ -176,6 +176,7 @@ def test_get_outline(src, outline_elements):
+ assert len(outline) == outline_elements
+
+
+ @pytest.mark.parametrize(
+ ("src", "expected_images"),
+ [
+@@ -866,6 +867,7 @@ def test_get_fields():
+ assert dict(fields["c1-1"]) == ({"/FT": "/Btn", "/T": "c1-1"})
+
+
+ def test_get_full_qualified_fields():
+ url = "https://github.com/py-pdf/PyPDF2/files/10142389/fields_with_dots.pdf"
+ name = "fields_with_dots.pdf"
+@@ -1214,6 +1216,7 @@ def test_zeroing_xref():
+ len(reader.pages)
+
+
+ def test_thread():
+ url = "https://github.com/py-pdf/pypdf/files/9066120/UTA_OSHA_3115_Fall_Protection_Training_09162021_.pdf"
+ name = "UTA_OSHA.pdf"
+@@ -1226,6 +1229,7 @@ def test_thread():
+ assert len(reader.threads) >= 1
+
+
+ def test_build_outline_item(caplog):
+ url = "https://github.com/py-pdf/pypdf/files/9464742/shiv_resume.pdf"
+ name = "shiv_resume.pdf"
+@@ -1253,6 +1257,7 @@ def test_build_outline_item(caplog):
+ assert "Unexpected destination 2" in exc.value.args[0]
+
+
+ @pytest.mark.parametrize(
+ ("src", "page_labels"),
+ [
+diff --git a/tests/test_writer.py b/tests/test_writer.py
+index 60b4a17..20c4de0 100644
+--- a/tests/test_writer.py
++++ b/tests/test_writer.py
+@@ -930,6 +930,7 @@ def test_startup_dest():
+ pdf_file_writer.open_destination = None
+
+
+ def test_iss471():
+ url = "https://github.com/py-pdf/pypdf/files/9139245/book.pdf"
+ name = "book_471.pdf"
+@@ -942,6 +943,7 @@ def test_iss471():
+ )
+
+
+ def test_reset_translation():
+ url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924666.pdf"
+ name = "tika-924666.pdf"
+@@ -977,6 +979,7 @@ def test_threads_empty():
+ assert thr == thr2
+
+
+ def test_append_without_annots_and_articles():
+ url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924666.pdf"
+ name = "tika-924666.pdf"
+@@ -993,6 +996,7 @@ def test_append_without_annots_and_articles():
+ assert len(writer.threads) >= 1
+
+
+ def test_append_multiple():
+ url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924666.pdf"
+ name = "tika-924666.pdf"
+--
+2.39.1
+