File: 0004-Skip-tests-that-require-internet-access.patch

package info (click to toggle)
fpdf2 2.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,860 kB
  • sloc: python: 39,487; sh: 133; makefile: 12
file content (51 lines) | stat: -rw-r--r-- 1,504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Elena ``of Valhalla'' Grandi <valhalla@debian.org>
Date: Wed, 6 Dec 2023 11:11:08 +0100
Subject: Skip tests that require internet access.

Forwarded: not-needed
---
 test/image/test_url_images.py       | 3 +++
 test/layout/test_page_background.py | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/test/image/test_url_images.py b/test/image/test_url_images.py
index 9e521ed..cf6c108 100644
--- a/test/image/test_url_images.py
+++ b/test/image/test_url_images.py
@@ -1,5 +1,7 @@
 from pathlib import Path
 
+import pytest
+
 import fpdf
 from test.conftest import assert_pdf_equal
 
@@ -7,6 +9,7 @@ HERE = Path(__file__).resolve().parent
 PNG_IMG_URL = "https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"
 
 
+@pytest.mark.skip(reason="requires internet access")
 def test_png_url(tmp_path):
     pdf = fpdf.FPDF()
     pdf.add_page()
diff --git a/test/layout/test_page_background.py b/test/layout/test_page_background.py
index c714c15..0576532 100644
--- a/test/layout/test_page_background.py
+++ b/test/layout/test_page_background.py
@@ -1,6 +1,8 @@
 import io
 from pathlib import Path
 
+import pytest
+
 from PIL import Image
 
 from fpdf import FPDF, drawing
@@ -87,6 +89,7 @@ def add_page_without_background(pdf):
     pdf.cell(0, 10, "No background", align="R", border=1)
 
 
+@pytest.mark.skip(reason="requires internet access")
 def test_page_background(tmp_path):
     """
     Test creating a PDF with multiple pages using all pfsible inputs to set a page background,