Mark stdin warning related tests with requires_external_processes (#1289)

* Mark test_stdin_read_warning with requires_installation

* Mark stdin tests with requires_external_processes

Co-authored-by: Nilushan Costa <19643850+nilushancosta@users.noreply.github.com>
This commit is contained in:
Batuhan Taskaya 2022-02-01 12:52:07 +03:00 committed by GitHub
parent 86ba995ad8
commit 7abddfe350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
[pytest] [pytest]
markers = markers =
# If you want to run tests without a full HTTPie installation
# we advise you to disable the markers below, e.g:
# pytest -m 'not requires_installation and not requires_external_processes'
requires_installation requires_installation
requires_external_processes

View File

@ -121,6 +121,7 @@ def stdin_processes(httpbin, *args):
@pytest.mark.parametrize("wait", (True, False)) @pytest.mark.parametrize("wait", (True, False))
@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")
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):
@ -138,6 +139,7 @@ def test_reading_from_stdin(httpbin, wait):
assert b'> warning: no stdin data read in 0.1s' not in errs assert b'> warning: no stdin data read in 0.1s' not in errs
@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")
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):
@ -153,6 +155,7 @@ def test_stdin_read_warning(httpbin):
assert b'> warning: no stdin data read in 0.1s' in errs assert b'> warning: no stdin data read in 0.1s' in errs
@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")
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):