Skip tests that randomly fail on Windows in CI

This commit is contained in:
Jakub Roztocil 2021-06-26 14:03:31 +02:00
parent b4c94e0f26
commit ae6f57dc76

View File

@ -1,6 +1,7 @@
"""High-level tests.""" """High-level tests."""
import pytest import pytest
from httpie.compat import is_windows
from httpie.status import ExitStatus from httpie.status import ExitStatus
from .fixtures import FILE_PATH_ARG, FILE_CONTENT from .fixtures import FILE_PATH_ARG, FILE_CONTENT
from .utils import http, HTTP_OK from .utils import http, HTTP_OK
@ -66,6 +67,7 @@ def test_max_redirects(httpbin):
assert r.exit_status == ExitStatus.ERROR_TOO_MANY_REDIRECTS assert r.exit_status == ExitStatus.ERROR_TOO_MANY_REDIRECTS
@pytest.mark.skipif(is_windows, reason='occasionally fails w/ ConnectionError for no apparent reason')
@pytest.mark.parametrize('status_code', REDIRECTS_WITH_METHOD_BODY_PRESERVED) @pytest.mark.parametrize('status_code', REDIRECTS_WITH_METHOD_BODY_PRESERVED)
def test_follow_redirect_with_repost(httpbin, status_code): def test_follow_redirect_with_repost(httpbin, status_code):
r = http( r = http(
@ -79,6 +81,7 @@ def test_follow_redirect_with_repost(httpbin, status_code):
assert FILE_CONTENT in r assert FILE_CONTENT in r
@pytest.mark.skipif(is_windows, reason='occasionally fails w/ ConnectionError for no apparent reason')
@pytest.mark.parametrize('status_code', REDIRECTS_WITH_METHOD_BODY_PRESERVED) @pytest.mark.parametrize('status_code', REDIRECTS_WITH_METHOD_BODY_PRESERVED)
def test_verbose_follow_redirect_with_repost(httpbin, status_code): def test_verbose_follow_redirect_with_repost(httpbin, status_code):
r = http( r = http(