mirror of
https://github.com/httpie/cli.git
synced 2024-11-08 08:55:05 +01:00
3865fabf09
https://docs.python.org/3.10/whatsnew/3.10.html#enum Python 3.10 changed the repr of enum members, and the doctest of tests.utils.http failed. Exact reprs are unfortunately not considered stable API between Python releases: =================================== FAILURES =================================== __________________________ [doctest] tests.utils.http __________________________ 209 210 Example: 211 212 $ http --auth=user:password GET pie.dev/basic-auth/user/password 213 214 >>> httpbin = getfixture('httpbin') 215 >>> r = http('-a', 'user:pw', httpbin.url + '/basic-auth/user/pw') 216 >>> type(r) == StrCLIResponse 217 True 218 >>> r.exit_status Expected: <ExitStatus.SUCCESS: 0> Got: ExitStatus.SUCCESS A simple replacement of the expected output however breaks the doctest on Python 3.9. This is the best solution I could think of that keeps the docstring readable and doctest working in Pythons both old and new. |
||
---|---|---|
.. | ||
client_certs | ||
fixtures | ||
utils | ||
__init__.py | ||
conftest.py | ||
README.rst | ||
test_auth_plugins.py | ||
test_auth.py | ||
test_binary.py | ||
test_cli.py | ||
test_compress.py | ||
test_config.py | ||
test_defaults.py | ||
test_docs.py | ||
test_downloads.py | ||
test_errors.py | ||
test_exit_status.py | ||
test_httpie.py | ||
test_offline.py | ||
test_output.py | ||
test_redirects.py | ||
test_regressions.py | ||
test_sessions.py | ||
test_ssl.py | ||
test_stream.py | ||
test_tokens.py | ||
test_unicode.py | ||
test_uploads.py | ||
test_windows.py |
HTTPie Test Suite ================= Please see `CONTRIBUTING`_. .. _CONTRIBUTING: https://github.com/httpie/httpie/blob/master/CONTRIBUTING.rst