mirror of
https://github.com/curl/curl.git
synced 2026-08-13 04:30:51 +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
|
|
@ -39,6 +39,13 @@ def env(pytestconfig) -> Env:
|
|||
env = Env(pytestconfig=pytestconfig)
|
||||
level = logging.DEBUG if env.verbose > 0 else logging.INFO
|
||||
logging.getLogger('').setLevel(level=level)
|
||||
if not env.curl_has_protocol('http'):
|
||||
pytest.skip("curl built without HTTP support")
|
||||
if not env.curl_has_protocol('https'):
|
||||
pytest.skip("curl built without HTTPS support")
|
||||
if env.setup_incomplete():
|
||||
pytest.skip(env.incomplete_reason())
|
||||
|
||||
env.setup()
|
||||
return env
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue