File: Disable-tests-that-require-remote-files.patch

package info (click to toggle)
tifffile 20250828-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,260 kB
  • sloc: python: 39,619; makefile: 7
file content (93 lines) | stat: -rw-r--r-- 3,686 bytes parent folder | download
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From: Ole Streicher <olebole@debian.org>
Date: Sat, 16 May 2020 18:10:59 +0200
Subject: Disable tests that require remote files

---
 tests/test_tifffile.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/test_tifffile.py b/tests/test_tifffile.py
index d614fa3..d87173c 100644
--- a/tests/test_tifffile.py
+++ b/tests/test_tifffile.py
@@ -587,6 +587,7 @@ def test_issue_imread_kwargs_legacy():
 
 
 @pytest.mark.skipif(SKIP_PRIVATE, reason=REASON)
+@pytest.mark.skip(reason="file not available")
 def test_issue_infinite_loop():
     """Test infinite loop reading more than two tags of same code in IFD."""
     # Reported by D. Hughes on 2019.7.26
@@ -4193,6 +4194,7 @@ def test_class_omexml_fail(shape, storedshape, dtype, axes, error):
     ],
 )
 @pytest.mark.parametrize('metadata', ('axes', None))
+@pytest.mark.skip(reason="remote connection not available")
 def test_class_omexml(axes, autoaxes, shape, storedshape, dimorder, metadata):
     """Test OmeXml class."""
     dtype = numpy.uint8
@@ -4284,6 +4286,7 @@ def test_class_omexml(axes, autoaxes, shape, storedshape, dimorder, metadata):
         ),
     ],
 )
+@pytest.mark.skip(reason="remote connection not available")
 def test_class_omexml_modulo(axes, shape, storedshape, sizetzc, dimorder):
     """Test OmeXml class with modulo dimensions."""
     dtype = numpy.uint8
@@ -4298,6 +4301,7 @@ def test_class_omexml_modulo(axes, shape, storedshape, sizetzc, dimorder):
     assert_valid_omexml(omexml)
 
 
+@pytest.mark.skip(reason="remote connection not available")
 def test_class_omexml_attributes():
     """Test OmeXml class with attributes and elements."""
     from uuid import uuid1
@@ -4458,6 +4462,7 @@ def test_class_omexml_datasets():
             assert len(tif.series) == 6
 
 
+@pytest.mark.skip(reason="remote connection not available")
 def test_class_omexml_multiimage():
     """Test OmeXml class with multiple images."""
     omexml = OmeXml(description='multiimage')
@@ -5523,7 +5528,7 @@ def test_func_pformat_xml():
     )
 
     assert pformat(value, height=8, width=60, linewidth=None) == (
-        """<?xml version='1.0' encoding='ISO-8859-1'?>
+        """<?xml version="1.0" encoding="ISO-8859-1" ?>
 <Dimap_Document name="band2.dim">
  <Metadata_Id>
   <METADATA_FORMAT version="2.12.1">DIMAP</METADATA_FORMAT>
@@ -5984,6 +5989,7 @@ def assert_filehandle(fh, offset=0):
 
 
 @pytest.mark.skipif(SKIP_HTTP, reason=REASON)
+@pytest.mark.skip(reason="remote connection not available")
 def test_filehandle_seekable():
     """Test FileHandle must be seekable."""
     from urllib.request import HTTPHandler, build_opener
@@ -14820,6 +14826,7 @@ def test_write_codecs(mode, tile, codec):
     'dtype', ['u1', 'u2', 'u4', 'i1', 'i2', 'i4', 'f2', 'f4', 'f8']
 )
 @pytest.mark.parametrize('byteorder', ['>', '<'])
+@pytest.mark.skipif(SKIP_PUBLIC, reason=REASON)
 def test_write_predictor(byteorder, dtype, tile, mode):
     """Test predictors."""
     if dtype[0] == 'f' and SKIP_CODECS:
@@ -19614,6 +19621,7 @@ def test_write_imagej_raw():
         ((2, 3, 4, 5, 6, 7, 33, 31, 3), 'TQCPZRYXS'),
     ],
 )
+@pytest.mark.skip(reason="remote connection not available")
 def test_write_ome(shape, axes):
     """Test write OME-TIFF format."""
     photometric = None
@@ -19824,6 +19832,7 @@ def test_write_ome_methods(method):
 
 
 @pytest.mark.parametrize('contiguous', [True, False])
+@pytest.mark.skip(reason="remote connection not available")
 def test_write_ome_manual(contiguous):
     """Test write OME-TIFF manually."""
     data = numpy.random.randint(0, 255, (19, 31, 21), numpy.uint8)