resolve merge conflicts

This commit is contained in:
Ahmed TAHRI
2024-03-18 18:35:46 +01:00
parent 19e75dfd60
commit bb1acd9eb2
3 changed files with 4 additions and 11 deletions

View File

@ -98,7 +98,6 @@ dev =
flake8-deprecated flake8-deprecated
flake8-mutable flake8-mutable
flake8-tuple flake8-tuple
pyopenssl
pytest-cov pytest-cov
pyyaml pyyaml
twine twine

View File

@ -2,7 +2,7 @@
import argparse import argparse
import pytest import pytest
from niquests.exceptions import InvalidSchema from niquests.exceptions import InvalidSchema, MissingSchema
import httpie.cli.argparser import httpie.cli.argparser
from httpie.cli import constants from httpie.cli import constants
@ -363,13 +363,13 @@ class TestSchemes:
# InvalidSchema is expected because HTTPie # InvalidSchema is expected because HTTPie
# shouldn't touch a formally valid scheme. # shouldn't touch a formally valid scheme.
with pytest.raises(InvalidSchema): with pytest.raises(InvalidSchema):
http('foo+bar-BAZ.123://bah') http('foo+bar://bah')
def test_invalid_scheme_via_via_default_scheme(self): def test_invalid_scheme_via_via_default_scheme(self):
# InvalidSchema is expected because HTTPie # InvalidSchema is expected because HTTPie
# shouldn't touch a formally valid scheme. # shouldn't touch a formally valid scheme.
with pytest.raises(InvalidSchema): with pytest.raises((InvalidSchema, MissingSchema,)):
http('bah', '--default=scheme=foo+bar-BAZ.123') http('bah', '--default=scheme=foo+bar')
def test_default_scheme_option(self, httpbin_secure): def test_default_scheme_option(self, httpbin_secure):
url = f'{httpbin_secure.host}:{httpbin_secure.port}' url = f'{httpbin_secure.host}:{httpbin_secure.port}'

View File

@ -5,8 +5,6 @@ import subprocess
import time import time
import contextlib import contextlib
from flaky import flaky
import httpie.__main__ as main import httpie.__main__ as main
import pytest import pytest
@ -128,7 +126,6 @@ def stdin_processes(httpbin, *args, warn_threshold=0.1):
@pytest.mark.parametrize("wait", (True, False)) @pytest.mark.parametrize("wait", (True, False))
@pytest.mark.requires_external_processes @pytest.mark.requires_external_processes
@pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files") @pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files")
@flaky(max_runs=6)
def test_reading_from_stdin(httpbin, wait): def test_reading_from_stdin(httpbin, wait):
with stdin_processes(httpbin) as (process_1, process_2): with stdin_processes(httpbin) as (process_1, process_2):
process_1.communicate(timeout=0.1, input=b"bleh") process_1.communicate(timeout=0.1, input=b"bleh")
@ -147,7 +144,6 @@ def test_reading_from_stdin(httpbin, wait):
@pytest.mark.requires_external_processes @pytest.mark.requires_external_processes
@pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files") @pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files")
@flaky(max_runs=6)
def test_stdin_read_warning(httpbin): def test_stdin_read_warning(httpbin):
with stdin_processes(httpbin) as (process_1, process_2): with stdin_processes(httpbin) as (process_1, process_2):
# Wait before sending any data # Wait before sending any data
@ -164,7 +160,6 @@ def test_stdin_read_warning(httpbin):
@pytest.mark.requires_external_processes @pytest.mark.requires_external_processes
@pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files") @pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files")
@flaky(max_runs=6)
def test_stdin_read_warning_with_quiet(httpbin): def test_stdin_read_warning_with_quiet(httpbin):
with stdin_processes(httpbin, "-qq") as (process_1, process_2): with stdin_processes(httpbin, "-qq") as (process_1, process_2):
# Wait before sending any data # Wait before sending any data
@ -181,7 +176,6 @@ def test_stdin_read_warning_with_quiet(httpbin):
@pytest.mark.requires_external_processes @pytest.mark.requires_external_processes
@pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files") @pytest.mark.skipif(is_windows, reason="Windows doesn't support select() calls into files")
@flaky(max_runs=6)
def test_stdin_read_warning_blocking_exit(httpbin): def test_stdin_read_warning_blocking_exit(httpbin):
# Use a very large number. # Use a very large number.
with stdin_processes(httpbin, warn_threshold=999) as (process_1, process_2): with stdin_processes(httpbin, warn_threshold=999) as (process_1, process_2):