mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:53:32 +03:00
pytest: improvements for suitable curl and error output
- will check built curl for http and https support and skip all tests if not there - will dump stdout/stderr/trace output on errored responses Closes #10829
This commit is contained in:
parent
8455013359
commit
8cabef6fc3
16 changed files with 131 additions and 106 deletions
|
|
@ -34,8 +34,6 @@ from testenv import Env, CurlClient
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.skipif(condition=Env.setup_incomplete(),
|
||||
reason=f"missing: {Env.incomplete_reason()}")
|
||||
class TestPush:
|
||||
|
||||
@pytest.fixture(autouse=True, scope='class')
|
||||
|
|
@ -68,7 +66,7 @@ class TestPush:
|
|||
url = f'https://{env.domain1}:{env.https_port}/push/data1'
|
||||
r = curl.http_download(urls=[url], alpn_proto='h2', with_stats=False,
|
||||
with_headers=True)
|
||||
assert r.exit_code == 0, f'{r}'
|
||||
r.check_exit_code(0)
|
||||
assert len(r.responses) == 2, f'{r.responses}'
|
||||
assert r.responses[0]['status'] == 103, f'{r.responses}'
|
||||
assert 'link' in r.responses[0]['header'], f'{r.responses[0]}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue