mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Skip timeout checks on slower running valgrind job
This commit is contained in:
parent
91b01f4cc2
commit
2803304763
2
.github/workflows/test-valgrind.yml
vendored
2
.github/workflows/test-valgrind.yml
vendored
|
@ -48,5 +48,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# The Pillow user in the docker container is UID 1000
|
# The Pillow user in the docker container is UID 1000
|
||||||
sudo chown -R 1000 $GITHUB_WORKSPACE
|
sudo chown -R 1000 $GITHUB_WORKSPACE
|
||||||
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
docker run --name pillow_container -e "PILLOW_VALGRIND_TEST=true" -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
||||||
sudo chown -R runner $GITHUB_WORKSPACE
|
sudo chown -R runner $GITHUB_WORKSPACE
|
||||||
|
|
|
@ -286,6 +286,7 @@ def test_pdf_append_to_bytesio():
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.timeout(1)
|
@pytest.mark.timeout(1)
|
||||||
|
@pytest.mark.skipif("PILLOW_VALGRIND_TEST" in os.environ, reason="Valgrind is slower")
|
||||||
@pytest.mark.parametrize("newline", (b"\r", b"\n"))
|
@pytest.mark.parametrize("newline", (b"\r", b"\n"))
|
||||||
def test_redos(newline):
|
def test_redos(newline):
|
||||||
malicious = b" trailer<<>>" + newline * 3456
|
malicious = b" trailer<<>>" + newline * 3456
|
||||||
|
|
|
@ -512,8 +512,11 @@ class TestImage:
|
||||||
i = Image.new("RGB", [1, 1])
|
i = Image.new("RGB", [1, 1])
|
||||||
assert isinstance(i.size, tuple)
|
assert isinstance(i.size, tuple)
|
||||||
|
|
||||||
|
@pytest.mark.timeout(0.75)
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
"PILLOW_VALGRIND_TEST" in os.environ, reason="Valgrind is slower"
|
||||||
|
)
|
||||||
@pytest.mark.parametrize("size", ((0, 100000000), (100000000, 0)))
|
@pytest.mark.parametrize("size", ((0, 100000000), (100000000, 0)))
|
||||||
@pytest.mark.timeout(0.5)
|
|
||||||
def test_empty_image(self, size):
|
def test_empty_image(self, size):
|
||||||
Image.new("RGB", size)
|
Image.new("RGB", size)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user