Skip to content

Commit a716261

Browse files
committed
Skip corner cases that PyPy can't handle
1 parent ee15873 commit a716261

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/test_igzip_lib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import itertools
1313
import os
1414
import pickle
15+
import sys
1516
import zlib
1617
from typing import NamedTuple
1718

@@ -119,6 +120,9 @@ def testDecompress4G(self):
119120
compressed = None
120121
decompressed = None
121122

123+
@pytest.mark.skipif(sys.implementation.name == "pypy",
124+
reason="Pickling is not a requirement, and certainly "
125+
"not a blocker for PyPy.")
122126
def testPickle(self):
123127
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
124128
with pytest.raises(TypeError):

tests/test_zlib_compliance.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,11 @@ def test_flush_large_length(self, size):
662662
dco.decompress(data, 1)
663663
self.assertEqual(dco.flush(size), input[1:])
664664

665+
# Skip this test for pypy. This is an extreme fringe use case. There are
666+
# constants provided for the mode parameter, so it seems very unlikely
667+
# custom ints will be used.
668+
@unittest.skipIf(sys.implementation.name == "pypy",
669+
"PyPy does not handle __index__ properly")
665670
def test_flush_custom_length(self):
666671
input = HAMLET_SCENE * 10
667672
data = isal_zlib.compress(input, 1)

0 commit comments

Comments
 (0)