Skip to content
Open
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
11 changes: 7 additions & 4 deletions Tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,14 @@ def mark_if_feature_version(
return pytest.mark.pil_noop_mark()


def is_pypy() -> bool:
return sys.implementation.name == "pypy"


@pytest.mark.skipif(sys.platform.startswith("win32"), reason="Requires Unix or macOS")
# Per https://stackoverflow.com/a/29007723/51685, due to JIT compilation,
# RSS utilization is known to grow so measuring it doesn't make that much sense.
@pytest.mark.skipif(is_pypy(), reason="max RSS utilization is not stable on PyPy")
class PillowLeakTestCase:
# requires unix/macOS
iterations = 100 # count
Expand Down Expand Up @@ -332,7 +339,3 @@ def is_ppc64le() -> bool:

def is_win32() -> bool:
return sys.platform.startswith("win32")


def is_pypy() -> bool:
return sys.implementation.name == "pypy"
4 changes: 3 additions & 1 deletion Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,9 @@ def test_check_size(self) -> None:
assert isinstance(i.size, tuple)

@timeout_unless_slower_valgrind(0.75)
@pytest.mark.parametrize("size", ((0, 100000000), (100000000, 0)))
@pytest.mark.parametrize(
"size", ((0, 10_000_000), (10_000_000, 0)), ids=("tall", "wide")
)
def test_empty_image(self, size: tuple[int, int]) -> None:
Image.new("RGB", size)

Expand Down